Skip to content

Commit 11731fb

Browse files
committed
lint
1 parent 4ae8c42 commit 11731fb

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

packages/toolbox-core/README.md

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,36 @@ involving Large Language Models (LLMs).
1717
<!-- TOC ignore:true -->
1818
<!-- TOC -->
1919

20-
- [Installation](#installation)
21-
- [Quickstart](#quickstart)
22-
- [Usage](#usage)
23-
- [Loading Tools](#loading-tools)
24-
- [Load a toolset](#load-a-toolset)
25-
- [Load a single tool](#load-a-single-tool)
26-
- [Invoking Tools](#invoking-tools)
27-
- [Synchronous Usage](#synchronous-usage)
28-
- [Use with LangGraph](#use-with-langgraph)
29-
- [Authenticating to the Toolbox Server](#authenticating-to-the-toolbox-server)
30-
- [When is Client-to-Server Authentication Needed?](#when-is-client-to-server-authentication-needed)
31-
- [How it works](#how-it-works)
32-
- [Configuration](#configuration)
33-
- [Authenticating with Google Cloud Servers](#authenticating-with-google-cloud-servers)
34-
- [Step by Step Guide for Cloud Run](#step-by-step-guide-for-cloud-run)
35-
- [Authenticating Tools](#authenticating-tools)
36-
- [When is Authentication Needed?](#when-is-authentication-needed)
37-
- [Supported Authentication Mechanisms](#supported-authentication-mechanisms)
38-
- [Step 1: Configure Tools in Toolbox Service](#step-1-configure-tools-in-toolbox-service)
39-
- [Step 2: Configure SDK Client](#step-2-configure-sdk-client)
40-
- [Provide an ID Token Retriever Function](#provide-an-id-token-retriever-function)
41-
- [Option A: Add Authentication to a Loaded Tool](#option-a-add-authentication-to-a-loaded-tool)
42-
- [Option B: Add Authentication While Loading Tools](#option-b-add-authentication-while-loading-tools)
43-
- [Complete Authentication Example](#complete-authentication-example)
44-
- [Binding Parameter Values](#binding-parameter-values)
45-
- [Why Bind Parameters?](#why-bind-parameters)
46-
- [Option A: Binding Parameters to a Loaded Tool](#option-a-binding-parameters-to-a-loaded-tool)
47-
- [Option B: Binding Parameters While Loading Tools](#option-b-binding-parameters-while-loading-tools)
48-
- [Binding Dynamic Values](#binding-dynamic-values)
20+
- [MCP Toolbox Core SDK](#mcp-toolbox-core-sdk)
21+
- [Installation](#installation)
22+
- [Quickstart](#quickstart)
23+
- [Usage](#usage)
24+
- [Loading Tools](#loading-tools)
25+
- [Load a toolset](#load-a-toolset)
26+
- [Load a single tool](#load-a-single-tool)
27+
- [Invoking Tools](#invoking-tools)
28+
- [Synchronous Usage](#synchronous-usage)
29+
- [Use with LangGraph](#use-with-langgraph)
30+
- [Authenticating to the Toolbox Server](#authenticating-to-the-toolbox-server)
31+
- [When is Client-to-Server Authentication Needed?](#when-is-client-to-server-authentication-needed)
32+
- [How it works](#how-it-works)
33+
- [Configuration](#configuration)
34+
- [Authenticating with Google Cloud Servers](#authenticating-with-google-cloud-servers)
35+
- [Step by Step Guide for Cloud Run](#step-by-step-guide-for-cloud-run)
36+
- [Authenticating Tools](#authenticating-tools)
37+
- [When is Authentication Needed?](#when-is-authentication-needed)
38+
- [Supported Authentication Mechanisms](#supported-authentication-mechanisms)
39+
- [Step 1: Configure Tools in Toolbox Service](#step-1-configure-tools-in-toolbox-service)
40+
- [Step 2: Configure SDK Client](#step-2-configure-sdk-client)
41+
- [Provide an ID Token Retriever Function](#provide-an-id-token-retriever-function)
42+
- [Option A: Add Authentication to a Loaded Tool](#option-a-add-authentication-to-a-loaded-tool)
43+
- [Option B: Add Authentication While Loading Tools](#option-b-add-authentication-while-loading-tools)
44+
- [Complete Authentication Example](#complete-authentication-example)
45+
- [Binding Parameter Values](#binding-parameter-values)
46+
- [Why Bind Parameters?](#why-bind-parameters)
47+
- [Option A: Binding Parameters to a Loaded Tool](#option-a-binding-parameters-to-a-loaded-tool)
48+
- [Option B: Binding Parameters While Loading Tools](#option-b-binding-parameters-while-loading-tools)
49+
- [Binding Dynamic Values](#binding-dynamic-values)
4950
- [Contributing](#contributing)
5051
- [License](#license)
5152
- [Support](#support)
@@ -59,7 +60,7 @@ pip install toolbox-core
5960
```
6061

6162
> [!NOTE]
62-
> * The primary `ToolboxClient` is asynchronous and requires using `await` for
63+
> - The primary `ToolboxClient` is asynchronous and requires using `await` for
6364
> loading and invoking tools, as shown in most examples.
6465
> * Asynchronous code needs to run within an event loop (e.g., using
6566
> `asyncio.run()` or in an async framework). See the [Python `asyncio`
@@ -72,6 +73,7 @@ pip install toolbox-core
7273

7374
Here's a minimal example to get you started. Ensure your Toolbox service is
7475
running and accessible.
76+
7577
```py
7678
import asyncio
7779
from toolbox_core import ToolboxClient
@@ -323,15 +325,18 @@ ensuring only authorized users or applications can invoke them, especially when
323325
accessing sensitive data.
324326

325327
### When is Authentication Needed?
328+
326329
Authentication is configured per-tool within the Toolbox service itself. If a
327330
tool you intend to use is marked as requiring authentication in the service, you
328331
must configure the SDK client to provide the necessary credentials (currently
329332
Oauth2 tokens) when invoking that specific tool.
330333

331334
### Supported Authentication Mechanisms
335+
332336
The Toolbox service enables secure tool usage through **Authenticated Parameters**. For detailed information on how these mechanisms work within the Toolbox service and how to configure them, please refer to [Toolbox Service Documentation - Authenticated Parameters](https://googleapis.github.io/genai-toolbox/resources/tools/#authenticated-parameters)
333337

334338
### Step 1: Configure Tools in Toolbox Service
339+
335340
First, ensure the target tool(s) are configured correctly in the Toolbox service
336341
to require authentication. Refer to the [Toolbox Service Documentation -
337342
Authenticated
@@ -434,9 +439,9 @@ fixed and will not be requested or modified by the LLM during tool use.
434439

435440
### Why Bind Parameters?
436441

437-
* **Protecting sensitive information:** API keys, secrets, etc.
438-
* **Enforcing consistency:** Ensuring specific values for certain parameters.
439-
* **Pre-filling known data:** Providing defaults or context.
442+
- **Protecting sensitive information:** API keys, secrets, etc.
443+
- **Enforcing consistency:** Ensuring specific values for certain parameters.
444+
- **Pre-filling known data:** Providing defaults or context.
440445

441446
> [!IMPORTANT]
442447
> The parameter names used for binding (e.g., `"api_key"`) must exactly match the
@@ -464,7 +469,6 @@ bound_tool = tool.bind_params({"param": "value"})
464469
Specify bound parameters directly when loading tools. This applies the binding
465470
only to the tools loaded in that specific call.
466471

467-
468472
```py
469473
bound_tool = await toolbox.load_tool("my-tool", bound_params={"param": "value"})
470474

0 commit comments

Comments
 (0)