If you’re building an agent, we recommend using sessions instead. See Tools and toolkits for how sessions handle tool discovery and execution automatically.

- Modifying or rewriting the tool description to better fit your use case
- Adding arguments to the tool (e.g., adding a
thoughtargument to prompt the agent to explain reasoning) - Hiding arguments from the tool when they’re irrelevant
- Adding extra arguments for custom use cases
- Adding default values to tool arguments
Below we modify the schema of
HACKERNEWS_GET_LATEST_POSTS to make the size argument required and remove the page argument.- Python
- TypeScript
page argument is removed and size is required.
Full example with LLM
Full example with LLM
- Python
- TypeScript
Example: Modifying the tool description
Sometimes you need to provide additional context to help the agent understand how to use a tool correctly. This example demonstrates modifying the description ofGITHUB_LIST_REPOSITORY_ISSUES to specify a default repository.
This approach is useful when you want to guide the agent’s behavior without changing the tool’s underlying functionality.
- We append additional instructions to the tool’s description
- The modified description tells the agent to use
composiohq/composioas the default repository - This helps prevent errors when the agent forgets to specify a repository parameter
- Python
- TypeScript