@devries-cameron20 / composio Mirror · read-only / commits / 67385a8db
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 15:45 UTC

Add Tools and Triggers section with fetching-tools page

- Add fetching-tools.mdx with tabbed Python/TypeScript code examples - Add sidebar section headers (Get Started, Tools and Triggers) - Position changelog correctly in sidebar (after Capabilities) - Remove underlines from prose links 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Sushmithamallesh committed Dec 30, 2025 at 00:38 UTC 67385a8dbf657a425235d8cdcd8e6a47c779f27e
4 files changed +231 -11
fumadocs/app/(home)/docs/layout.tsx
+8 -10
@@ -1,17 +1,15 @@
1 import { source } from '@/lib/source';
2 import { DocsLayout } from 'fumadocs-ui/layouts/docs';
3
4 -// Add changelog to the page tree
4 +// Insert changelog into page tree at correct position (after capabilities, before Tools and Triggers)
5 +const changelogPage = { type: 'page' as const, name: 'Changelog', url: '/docs/changelog' };
6 const pageTree = {
6 - name: source.pageTree.name,
7 - children: [
8 - ...source.pageTree.children,
9 - {
10 - type: 'page' as const,
11 - name: 'Changelog',
12 - url: '/docs/changelog',
13 - },
14 - ],
7 + ...source.pageTree,
8 + children: source.pageTree.children.flatMap((child) =>
9 + child.type === 'separator' && child.name === 'Tools and Triggers'
10 + ? [changelogPage, child]
11 + : child
12 + ),
13 };
14
15 export default function Layout({ children }: LayoutProps<'/docs'>) {
fumadocs/app/global.css
+1
@@ -216,6 +216,7 @@ pre {
216
217 :is(.prose, [data-fumadocs-body]) a:not([data-card]) {
218 color: var(--composio-orange);
219 + text-decoration: none;
220 }
221
222 /* Heading anchors stay neutral */
fumadocs/content/docs/fetching-tools.mdx new
+214
@@ -0,0 +1,214 @@
1 +---
2 +title: Fetching tools and schemas
3 +description: Fetch and filter tools, and inspect schemas
4 +---
5 +
6 +Fetch specific tools, filter by permissions or search, and inspect schemas for type information. Tools are automatically formatted for your provider.
7 +
8 +## Basic usage
9 +
10 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
11 + <Tab value="Python">
12 +```python
13 +tools = composio.tools.get(
14 + user_id,
15 + toolkits=["GITHUB"]
16 +)
17 +```
18 + </Tab>
19 + <Tab value="TypeScript">
20 +```typescript
21 +const tools = await composio.tools.get(userId, {
22 + toolkits: ["GITHUB"]
23 +});
24 +```
25 + </Tab>
26 +</Tabs>
27 +
28 +Returns top 20 tools by default. Tools require a `user_id` because they're scoped to authenticated accounts. See [User management](/docs/user-management) and [Authentication](/docs/authenticating-tools).
29 +
30 +## Tool schemas
31 +
32 +Inspect tool parameters and types without a user_id:
33 +
34 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
35 + <Tab value="Python">
36 +```python
37 +tool = composio.tools.get_raw_composio_tool_by_slug("GMAIL_SEND_EMAIL")
38 +```
39 + </Tab>
40 + <Tab value="TypeScript">
41 +```typescript
42 +const tool = await composio.tools.getRawComposioToolBySlug("GMAIL_SEND_EMAIL");
43 +```
44 + </Tab>
45 +</Tabs>
46 +
47 +Generate type-safe code for direct SDK execution with [`composio generate`](/docs/cli#generate-type-definitions). This creates TypeScript or Python types from tool schemas.
48 +
49 +<Callout type="info">
50 +View tool parameters and schemas visually in the [Composio platform](https://platform.composio.dev). Navigate to any toolkit and select a tool to see its input/output parameters.
51 +</Callout>
52 +
53 +## Filtering tools
54 +
55 +### By toolkit
56 +
57 +Get tools from specific apps. Returns top 20 tools by default.
58 +
59 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
60 + <Tab value="Python">
61 +```python
62 +# Fetch with limit for a specific user
63 +tools = composio.tools.get(
64 + user_id,
65 + toolkits=["GITHUB"],
66 + limit=5 # Get top 5 tools
67 +)
68 +
69 +# Same filter but without user_id (for schemas)
70 +raw_tools = composio.tools.get_raw_composio_tools(
71 + toolkits=["GITHUB"],
72 + limit=5
73 +)
74 +```
75 + </Tab>
76 + <Tab value="TypeScript">
77 +```typescript
78 +// Fetch with limit for a specific user
79 +const limitedTools = await composio.tools.get(userId, {
80 + toolkits: ["GITHUB"],
81 + limit: 5 // Get top 5 tools
82 +});
83 +
84 +// Same filter but without userId (for schemas)
85 +const rawTools = await composio.tools.getRawComposioTools({
86 + toolkits: ["GITHUB"],
87 + limit: 5
88 +});
89 +```
90 + </Tab>
91 +</Tabs>
92 +
93 +### By name
94 +
95 +Fetch specific tools when you know their names.
96 +
97 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
98 + <Tab value="Python">
99 +```python
100 +# Fetch specific tools by name
101 +tools = composio.tools.get(
102 + user_id,
103 + tools=["GITHUB_CREATE_ISSUE", "GITHUB_CREATE_PULL_REQUEST"]
104 +)
105 +
106 +# Get schemas without user_id
107 +raw_tools = composio.tools.get_raw_composio_tools(
108 + tools=["GITHUB_CREATE_ISSUE", "GITHUB_CREATE_PULL_REQUEST"]
109 +)
110 +```
111 + </Tab>
112 + <Tab value="TypeScript">
113 +```typescript
114 +// Fetch specific tools by name
115 +const specificTools = await composio.tools.get(userId, {
116 + tools: ["GITHUB_LIST_STARGAZERS", "GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER"]
117 +});
118 +
119 +// Get schemas without userId
120 +const specificRawTools = await composio.tools.getRawComposioTools({
121 + tools: ["GITHUB_LIST_STARGAZERS", "GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER"]
122 +});
123 +```
124 + </Tab>
125 +</Tabs>
126 +
127 +### By scopes
128 +
129 +Filter OAuth tools by permission level. Only works with a single toolkit.
130 +
131 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
132 + <Tab value="Python">
133 +```python
134 +# Filter by OAuth scopes (single toolkit only)
135 +tools = composio.tools.get(
136 + user_id,
137 + toolkits=["GITHUB"],
138 + scopes=["write:org"]
139 +)
140 +```
141 + </Tab>
142 + <Tab value="TypeScript">
143 +```typescript
144 +// Filter by OAuth scopes (single toolkit only)
145 +const scopedTools = await composio.tools.get(userId, {
146 + toolkits: ["GITHUB"],
147 + scopes: ["write:org"]
148 +});
149 +```
150 + </Tab>
151 +</Tabs>
152 +
153 +### By search (experimental)
154 +
155 +Find tools semantically.
156 +
157 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
158 + <Tab value="Python">
159 +```python
160 +# Search tools semantically
161 +tools = composio.tools.get(
162 + user_id,
163 + search="create calendar event"
164 +)
165 +
166 +# Search schemas without user_id
167 +raw_tools = composio.tools.get_raw_composio_tools(
168 + search="create calendar event"
169 +)
170 +
171 +# Search within a specific toolkit
172 +tools = composio.tools.get(
173 + user_id,
174 + search="issues",
175 + toolkits=["GITHUB"],
176 +)
177 +
178 +# Search toolkit schemas without user_id
179 +raw_tools = composio.tools.get_raw_composio_tools(
180 + search="issues",
181 + toolkits=["GITHUB"]
182 +)
183 +```
184 + </Tab>
185 + <Tab value="TypeScript">
186 +```typescript
187 +// Search tools semantically
188 +const searchResults = await composio.tools.get(userId, {
189 + search: "create google calendar event"
190 +});
191 +
192 +// Search schemas without userId
193 +const searchRawTools = await composio.tools.getRawComposioTools({
194 + search: "create google calendar event"
195 +});
196 +
197 +// Search within a specific toolkit
198 +const toolkitSearch = await composio.tools.get(userId, {
199 + search: "star a repository",
200 + toolkits: ["GITHUB"]
201 +});
202 +
203 +// Search toolkit schemas without userId
204 +const toolkitSearchRaw = await composio.tools.getRawComposioTools({
205 + search: "star a repository",
206 + toolkits: ["GITHUB"]
207 +});
208 +```
209 + </Tab>
210 +</Tabs>
211 +
212 +<Callout type="info">
213 +Use specific toolkit versions in production to prevent breaking changes. See [toolkit versioning](/docs/toolkit-versioning).
214 +</Callout>
fumadocs/content/docs/meta.json
+8 -1
@@ -1,3 +1,10 @@
1 {
2 - "pages": ["welcome", "quickstart", "capabilities"]
2 + "pages": [
3 + "---Get Started---",
4 + "welcome",
5 + "quickstart",
6 + "capabilities",
7 + "---Tools and Triggers---",
8 + "fetching-tools"
9 + ]
10 }