Choosing which tools need approval
You choose which tools need approval with their hints when you create a session. For example, this session asks the user before any tool that creates, updates or deletes something:- Python
- TypeScript
- API
tags in tools.<toolkit>.tags. This session asks before the same tools everywhere, except GitHub, where it only asks before tools that delete:
- Python
- TypeScript
- API
tags for that toolkit, including any tags you block, so list everything you still want for it.
Asking the user
When a tool needs approval,session.execute() raises an error:
- Python
- TypeScript
- API
input_requests holds the questions to ask the user, keyed by ID. Each question has a message describing the tool call, and a requested_schema describing the answer the user can give:
message and a form built from requested_schema. Build the form from the schema, since the choices vary between questions.
One tool execution can return several questions, for example when the agent runs several tools at once with COMPOSIO_MULTI_EXECUTE_TOOL. Answer all of them when you send the call again.
The questions follow the format of MCP elicitation requests, so you can reuse an existing elicitation UI.
Sending the answer
Send the same call again with the user’s answers:- Python
- TypeScript
- API
Approvals in MCP clients
Approvals use MCP elicitation, which lets a server ask the user for input through the client. When your agent connects to the session over MCP, clients that support elicitation, like Claude Code, ask the user for you. With clients that don’t support elicitation, calls that need approval are denied. To run them without approval instead, setno_elicitation_support_fallback to "allow":
- Python
- TypeScript
- API
Current limitations
- Workbench and bash scripts. Composio uses a model to find the tools a
COMPOSIO_REMOTE_WORKBENCHorCOMPOSIO_REMOTE_BASH_TOOLscript calls, so it can miss some. If approval must never be skipped, disable the sandbox. - Proxy execute.
session.proxy_execute()is currently disabled for a toolkit when any of its tools need approval. - Hints. Rules based on hints are only as accurate as the hints, which Composio assigns on a best-effort basis. List tools explicitly for anything you must gate.
- Providers. The SDK’s
handle_tool_callsand framework providers don’t handle approval yet. Run tool calls withsession.execute(), as in the full example below.
Full example
An agent loop with Claude that asks for approval in the terminal:- Python
- TypeScript