Metadata-Version: 2.4
Name: toolbox-core
Version: 1.0.0
Summary: Python Base SDK for interacting with the Toolbox service
Author-email: Google LLC <googleapis-packages@google.com>
Project-URL: Homepage, https://github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-core
Project-URL: Repository, https://github.com/googleapis/mcp-toolbox-sdk-python.git
Project-URL: Bug Tracker, https://github.com/googleapis/mcp-toolbox-sdk-python/issues
Project-URL: Changelog, https://github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-core/CHANGELOG.md
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pydantic<3.0.0,>=2.7.0
Requires-Dist: aiohttp<4.0.0,>=3.8.6
Requires-Dist: deprecated<2.0.0,>=1.2.15
Requires-Dist: google-auth<3.0.0,>=2.0.0
Requires-Dist: requests<3.0.0,>=2.19.0
Provides-Extra: telemetry
Requires-Dist: opentelemetry-api<2.0.0,>=1.20.0; extra == "telemetry"
Requires-Dist: opentelemetry-sdk<2.0.0,>=1.20.0; extra == "telemetry"
Requires-Dist: opentelemetry-exporter-otlp<2.0.0,>=1.20.0; extra == "telemetry"
Provides-Extra: test
Requires-Dist: black[jupyter]==26.1.0; extra == "test"
Requires-Dist: isort==8.0.0; extra == "test"
Requires-Dist: mypy==1.19.1; extra == "test"
Requires-Dist: pytest==9.0.2; extra == "test"
Requires-Dist: pytest-aioresponses==0.3.0; extra == "test"
Requires-Dist: pytest-asyncio==1.3.0; extra == "test"
Requires-Dist: pytest-cov==7.0.0; extra == "test"
Requires-Dist: pytest-mock==3.15.1; extra == "test"
Requires-Dist: google-cloud-secret-manager==2.26.0; extra == "test"
Requires-Dist: google-cloud-storage==3.7.0; extra == "test"
Requires-Dist: aioresponses==0.7.8; extra == "test"
Requires-Dist: toolbox-core[telemetry]; extra == "test"

![MCP Toolbox Logo](https://raw.githubusercontent.com/googleapis/genai-toolbox/main/logo.png)

# MCP Toolbox Core SDK

[![PyPI version](https://badge.fury.io/py/toolbox-core.svg)](https://badge.fury.io/py/toolbox-core) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/toolbox-core)](https://pypi.org/project/toolbox-core/) [![Coverage Status](https://coveralls.io/repos/github/googleapis/genai-toolbox/badge.svg?branch=main)](https://coveralls.io/github/googleapis/genai-toolbox?branch=main)
 [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

This SDK allows you to seamlessly integrate the functionalities of
[MCP Toolbox](https://github.com/googleapis/genai-toolbox) allowing you to load and
use tools defined in the service as standard Python functions within your GenAI
applications.

For detailed guides, authentication examples, and advanced configuration, visit the [Python SDK Core Guide](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/).

<!-- TOC ignore:true -->
<!-- TOC -->

- [Installation](#installation)
- [Quickstart](#quickstart)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
- [Support](#support)

<!-- /TOC -->

## Installation

```bash
pip install toolbox-core
```

## Quickstart

Here's a minimal example to get you started. Ensure your Toolbox service is
running and accessible.

```py
import asyncio
from toolbox_core import ToolboxClient

async def main():
    # Replace with the actual URL where your Toolbox service is running
    async with ToolboxClient("http://127.0.0.1:5000") as toolbox:
        weather_tool = await toolbox.load_tool("get_weather")
        result = await weather_tool(location="London")
        print(result)

if __name__ == "__main__":
    asyncio.run(main())
```

## Usage

The core package provides a framework-agnostic way to interact with your Toolbox server. For detailed guides and advanced configuration, please visit the following sections on our [Documentation Site](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/):

- [Transport Protocols](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#transport-protocols)
- [Loading Tools](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#loading-tools)
- [Invoking Tools](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#invoking-tools)
- [Synchronous Usage](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#synchronous-usage)
- [Use With Langraph](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#use-with-langgraph)
- [Client to Server Authentication](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#client-to-server-authentication)
- [Authenticating Tools](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#authenticating-tools)
- [Binding Parameter Values](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#parameter-binding)
- [OpenTelemetry](https://googleapis.github.io/genai-toolbox/sdks/python-sdk/core/#opentelemetry)


# Contributing

Contributions are welcome! Please refer to the [`DEVELOPER.md`](https://github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-core/DEVELOPER.md) file for guidelines on how to set up a development environment and run tests.

# License

This project is licensed under the Apache License 2.0. See the
[LICENSE](https://github.com/googleapis/genai-toolbox/blob/main/LICENSE) file for details.

# Support

If you encounter issues or have questions, check the existing [GitHub Issues](https://github.com/googleapis/genai-toolbox/issues) for the main Toolbox project.
