Adds composio-sdk/ with SKILL.md, AGENTS.md, and 18 rule files covering Tool Router, direct execution, triggers, and auth patterns. Source: composiohq/skills Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4.5 KiB
title, impact, description, tags
| title | impact | description | tags | |||||
|---|---|---|---|---|---|---|---|---|
| Fetching Tools for Applications | HIGH | Essential patterns for discovering and retrieving tools from Composio for direct execution in traditional applications |
|
Fetching Tools for Applications
When building traditional applications (non-agent workflows), use direct tool fetching methods to discover and retrieve tools from Composio.
Methods Overview
tools.get()- Use when working with a provider (OpenAI, Vercel, etc.). Returns tools wrapped in provider-specific format.tools.getRawComposioTools()- Use for standalone applications and building UIs. Returns raw tool metadata without provider wrapping.
1. tools.get() - For Provider-Based Applications
Use tools.get() when you're using Composio with a provider like OpenAI, Vercel AI SDK, or LangChain. This method wraps tools in the format expected by your provider.
Get tools from a toolkit:
// Get important tools only (auto-applies important filter)
const importantGithubTools = await composio.tools.get('default', {
toolkits: ['github']
});
// Get a limited number of tools (does NOT auto-apply important filter)
const githubTools = await composio.tools.get('default', {
toolkits: ['github'],
limit: 10
});
Get a specific tool by slug:
const tool = await composio.tools.get('default', 'GITHUB_GET_REPO');
2. tools.getRawComposioTools() - For Standalone Applications & UIs
Use getRawComposioTools() for standalone applications and building UIs. This method returns raw tool metadata without provider-specific wrapping, making it ideal for:
- Building tool selection UIs
- Creating tool catalogs or documentation
- Direct tool execution workflows (without providers)
- Custom tool management interfaces
// Get important tools (auto-applies important filter)
const importantTools = await composio.tools.getRawComposioTools({
toolkits: ['github']
});
// Get specific tools by slug
const specificTools = await composio.tools.getRawComposioTools({
tools: ['GITHUB_GET_REPOS', 'SLACK_SEND_MESSAGE']
});
// Get limited tools (does NOT auto-apply important)
const limitedTools = await composio.tools.getRawComposioTools({
toolkits: ['slack'],
limit: 5
});
Important Filter Behavior
The important filter auto-applies to show only the most commonly used tools.
Auto-applies when:
- Only
toolkitsfilter is provided (no other filters)
Does NOT auto-apply when:
limitis specifiedsearchis usedtools(specific slugs) are providedtagsare specifiedimportantis explicitly set tofalse
// Auto-applies important=true
await composio.tools.get('default', { toolkits: ['github'] });
// Does NOT auto-apply important (limit specified)
await composio.tools.get('default', { toolkits: ['github'], limit: 10 });
// Does NOT auto-apply important (search used)
await composio.tools.get('default', { search: 'repo' });
// Explicitly disable important filter
await composio.tools.get('default', { toolkits: ['github'], important: false });
Filter Parameters
Available filters for both tools.get() and tools.getRawComposioTools():
toolkits: Array of toolkit names (e.g.,['github', 'slack'])tools: Array of specific tool slugs (e.g.,['GITHUB_GET_REPO'])search: Search string for tool names/descriptionslimit: Maximum number of tools to returntags: Array of tags to filter byscopes: Array of scopes to filter byauthConfigIds: Array of auth config IDs to filter tools by specific auth configsimportant: Boolean to explicitly control important filter (auto-applies in some cases)
Note: You cannot use tools and toolkits filters together.
Schema Modification
Customize tool schemas at fetch time:
const customizedTools = await composio.tools.get('default', {
toolkits: ['github']
}, {
modifySchema: ({ toolSlug, toolkitSlug, schema }) => {
return { ...schema, description: 'Custom description' };
}
});
Best Practices
-
Choose the right method:
- Use
tools.get()when working with providers (OpenAI, Vercel, LangChain) - Use
tools.getRawComposioTools()for standalone apps, UIs, and catalogs
- Use
-
Use important filter for UIs: Show important tools first, then allow users to discover all tools
-
Cache tool metadata: Tools don't change frequently, cache the results
-
Filter by toolkit: Group tools by toolkit for better organization
-
Don't mix tools and toolkits filters: Cannot use both filters together