Skip to main content

ToolBoundary for Python

ToolBoundary examines tool calls in MCP Python SDK v1. It compares the direct parser result with the arguments that a registered stub handler receives. It compares the results and errors that the client receives with explicit expectations.

Install

Install the MCP adapter with pip install 'tool-boundary-py[mcp-v1]'.

Example

examples/error_case.py sends an explicit tool error through MCP Python SDK v1. It prints the report. On affected versions, it shows the difference at /text.

python examples/error_case.py

Use probe_mcp_tool in a pytest case. Set reference to a Pydantic model or another explicit parser. Pass a stub handler to register. Set expected_structured or expected_error_text to examine the response.

The adapter uses an in-memory MCP client session. It examines the client result from SDK dispatch. It does not examine HTTP or stdio transport behavior.

Development

In this directory, make a virtual environment. Install the package with pip install -e '.[dev]'. Run pytest and ruff check ..

The adapter uses the official MCP server dispatch path. The caller registers a test handler through the same function as the application tool. Do not give the probe a production handler.

The project README describes the report format and defect cases.

Metadata

Release files for tool-boundary-py 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tool-boundary-py 0.1.1
File Size Uploaded Provenance Actions
tool_boundary_py-0.1.1.tar.gz 7.3 kB Without provenance Details for tool_boundary_py-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tool-boundary-py 0.1.1
File Interpreter ABI Platform Actions
tool_boundary_py-0.1.1-py3-none-any.whl Python 3 none any Details for tool_boundary_py-0.1.1-py3-none-any.whl

Total release size: 14.5 kB

Release files / tool_boundary_py-0.1.1.tar.gz

Download URL tool_boundary_py-0.1.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
003994c4bde1eba391234318d2ab3d11df515f81336a139582bda9d3d82afb44
BLAKE2b-256 checksum
How to use checksums
bdd9ba4de9a7666de3d75b6edaf2275b58a1c0882c2f169fd8f7a44b98494ef0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tool_boundary_py-0.1.1-py3-none-any.whl

Download URL tool_boundary_py-0.1.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e60e3bfc212fb3669018230e0477215ba01d0b2009a8b470e69332be6499a999
BLAKE2b-256 checksum
How to use checksums
2f16138941c4458978cb98f789185d7b71e32ade46a170c0e99bef539ec7d598
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for tool-boundary-py 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page