Skip to content

Commit 7fde38f

Browse files
committed
fixup!
Signed-off-by: Tomas Pilar <thomas7pilar@gmail.com>
1 parent 826b252 commit 7fde38f

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

docs/agent-development/tool-calls.mdx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
---
22
title: "Approve Tool Calls"
3-
description: "Have tool calls approved by the client before execution"
3+
description: "Have tool calls approved by the user before execution"
44
---
55

66
Many agent frameworks support the ability to request user approval before executing certain actions. This is especially useful when an agent is calling external tools that may have significant effects or costs associated with their usage.
77

8-
The `Tool Call Extension` provides a mechanism for implementing this functionality over A2A connection.
8+
The Tool Call extension provides a mechanism for implementing this functionality over A2A connection.
99

10-
## Usage with BeeAI Framework
10+
## Usage
1111

1212
<Steps>
13-
<Step title="Install the BeeAI Framework dependency">
14-
Make sure `beeai-framework` is installed as a dependency in your project.
15-
</Step>
16-
17-
<Step title="Add extension to your agent">
18-
Inject the Tool Call extension into your agent function using the `Annotated`
13+
<Step title="Add Tool Call extension to your agent">
14+
Inject the `ToolCallExtension` into your agent function using the `Annotated`
1915
type hint.
2016
</Step>
2117

22-
<Step title="Implement the handler for AskPermissionRequirement">
23-
Use `request_tool_call_approval()` to request tool call approval from the user through A2A.
18+
<Step title="Implement the approval logic in your agent">
19+
Use `request_tool_call_approval()` method to request tool call approval from the A2A client side.
2420
</Step>
2521
</Steps>
2622

2723
## Basic Example
2824

29-
Here's how to use this extension with the BeeAI Framework to request user approval before executing a tool call:
25+
Here's how to use this extension with the [BeeAI Framework](https://framework.beeai.dev/modules/agents/requirement-agent#ask-permission-requirement) to request user approval before executing a tool call:
3026

3127
```python
3228
from typing import Annotated, Any
@@ -62,6 +58,7 @@ async def tool_call_agent(
6258
async def handler(tool: Tool, input: dict[str, Any]) -> bool:
6359
try:
6460
await mcp_tool_call.request_tool_call_approval(
61+
# using MCP Tool data model as intermediary to simplify conversion
6562
ToolCallRequest.from_mcp_tool(_tool_factory(tool), input=input),
6663
context=context,
6764
)

0 commit comments

Comments
 (0)