Schema Modifiers
Schema modifiers are part of Composio SDK’s powerful middleware capabilities that allow you to customize and extend the behavior of tools.
Schema Modifiers
Schema modifiers transform a tool’s schema before the tool is seen by an agent.

Useful for: - Adding arguments to the tool. For example, adding a thought
argument to the tool
to prompt the agent to explain the reasoning. - Hiding arguments from the tool. In cases where the
argument is irrelevant to the tool. - Adding extra arguments to the tool schema for custom use cases
or execution. - Adding default values to tool arguments.
Below we modify the schema of the HACKERNEWS_GET_LATEST_POSTS
to make the size
argument
required and remove the page
argument.
In using the above modified tool schema, the page
argument is removed and the size
argument is required.
You can test this out by viewing the tool call response in the LLM too!