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)

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chunky_mcp_utils-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 a96bc554c3fa97d811e8eef0d3a3566ec4565e11f2bb81ad5cb0597f73c378c6
MD5 6a837524eaae6ed9add9582e2d9aa5c3
BLAKE2b-256 70238d40e47a966f7ee81d1030b96946f6ea2400d34222e142bb9bc4f90f1f3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chunky_mcp_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00f0c6451d7e0c634b4f56dca639ad89eddf65846de49c3f39aab055e54708cb
MD5 fac36165f57deff39fe3b1ec82500394
BLAKE2b-256 1b951eb79da0b66cc31f1afcf398cba9e9aca414060732f41509088d7291ce30

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