Skip to main content

Utilities for handling large responses in chunky-mcp tools

Project description

chunky-mcp-utils

Utilities for handling large responses in chunky-mcp tools.

Installation

pip install chunky-mcp-utils

Usage

Import the helper in your tool:

from chunky_mcp_utils import handle_large_response

@mcp.tool()
def my_tool() -> list[types.TextContent]:
    """
    Gets a list of all the employees in the system from the database
    """
    # Might give a large JSON response
    response = requests.get("https://someblob.com")
    response.raise_for_status()
    response_data = response.json()
    
    # Chunker hanldes the large response and calls following read chunk tools
    result = handle_large_response(response_data, "my_tool", chunker)

Build + Publish

  1. python -m build
  2. twine upload dist/*

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chunky_mcp_utils-0.1.2.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chunky_mcp_utils-0.1.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file chunky_mcp_utils-0.1.2.tar.gz.

File metadata

  • Download URL: chunky_mcp_utils-0.1.2.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for chunky_mcp_utils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cc572baabdbbe5943136e3e9d59fea9134bbb6b6bdca01f03eba7d8dbb9cc150
MD5 2134a7c03a6a3e3d0cc5db2530a4f8e7
BLAKE2b-256 17c7ad9e864a6c84e13aaaf14739c2314f083be30fdca5c7084a91695a32f5ca

See more details on using hashes here.

File details

Details for the file chunky_mcp_utils-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for chunky_mcp_utils-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f37849435c6750a5e3ead4ff9a1bd2ab3791673ecf4154b52b5cd6e58cc6fc41
MD5 8eefb8c303f013c2bb6493462b71aa45
BLAKE2b-256 b6dac234e6a4c8e3bcd80426d3dd1ac1445d6a3da9deb8c5dac90ae9ba52ae8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page