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.3.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.3-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chunky_mcp_utils-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 fd3645b0b996d6776ac1723cc63714058c7fdc6d2bc12f75793a508e9757b0e8
MD5 bcac51c22dead1a1b4ccb2304fe69077
BLAKE2b-256 b8a6b73d38b9c1943ee5ee23caa09cf1c80569d5190e9931d5c6ccd168be1ed7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chunky_mcp_utils-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 115c083f1692dabf30394aaf68f5c3c9cba6fcc13dc9701a6fa19d2d01d6775e
MD5 a696d0325f203720d08a50fa19996347
BLAKE2b-256 41c46ede88a764bcf1f2c0ca0da1bae2331831dc2a449d9f94491ffad63f38b3

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