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.1.tar.gz (2.5 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.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chunky_mcp_utils-0.1.1.tar.gz
  • Upload date:
  • Size: 2.5 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.1.tar.gz
Algorithm Hash digest
SHA256 c9d3d5318d01a2a184343932529be25ab8a7470948bfefe4eaddf51e5d34fd96
MD5 e732a4645f4ba666aef6b400d3dcd432
BLAKE2b-256 ea3adeda903d135f09f4ba43697091a64a4cab34ba3992c02588790b24717706

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chunky_mcp_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2afb58169031c421cb2a552b5a8b2867b551a2391a7a32288c887a4376c2b281
MD5 bc1f6c2f0329590420fb351dccdae19a
BLAKE2b-256 5bb6ef9d01c86562b38ddf6f2e23facd5389fd988d658228a6132bd5688a667c

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