@devries-cameron20 / composio-1 / commits / f9c5cdfb6
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.

fix(docs): show Instant toolkit support and clarify account selection

Brendan O'Leary committed Oct 7, 2026 at 23:08 UTC f9c5cdfb682d84c1e9d8df62ea4f0f7df51c00ca
5 files changed +43 -7
docs/app/llms.mdx/[[...slug]]/route.ts
+2 -2
@@ -1,4 +1,4 @@
1 -import { instantDiscount, instantPricingDescription } from '@/lib/instant';
1 +import { instantDiscount, instantPricingDescription, toolkitSupportsInstant } from '@/lib/instant';
2 import {
3 source,
4 getReferenceSource,
@@ -871,7 +871,7 @@ function toolkitToMarkdown(
871 lines.push(`- **Version:** ${toolkit.version}`);
872 }
873
874 - if (toolkit.instant?.supported === true) {
874 + if (toolkitSupportsInstant(toolkit.instant, tools)) {
875 lines.push('- **Instant:** Supported on the latest version. Support varies by tool.');
876 }
877
docs/components/toolkits/toolkit-detail.tsx
+4 -3
@@ -6,7 +6,7 @@ import { Search, Copy, Check, ChevronDown, ChevronRight, ArrowLeft } from 'lucid
6 import { TypeTable } from 'fumadocs-ui/components/type-table';
7 import type { Toolkit, Tool, Trigger, ParameterSchema } from '@/types/toolkit';
8 import { processSchema } from '@/lib/toolkit-schema';
9 -import { instantDiscount, instantPricingDescription } from '@/lib/instant';
9 +import { instantDiscount, instantPricingDescription, toolkitSupportsInstant } from '@/lib/instant';
10 import { InstantBadge } from './instant-badge';
11 import { PageActions } from '@/components/page-actions';
12 import { EditOnGitHub } from '@/components/edit-on-github';
@@ -275,6 +275,7 @@ function ToolItem({ item, toolkitVersion, instant }: { item: Tool | Trigger; too
275 }
276
277 export function ToolkitDetail({ toolkit, tools, triggers, path, faq }: ToolkitDetailProps) {
278 + const instantSupported = toolkitSupportsInstant(toolkit.instant, tools);
279 const [copied, setCopied] = useState(false);
280 const [versionCopied, setVersionCopied] = useState(false);
281 const [toolSearch, setToolSearch] = useState('');
@@ -335,7 +336,7 @@ export function ToolkitDetail({ toolkit, tools, triggers, path, faq }: ToolkitDe
336 {/* Title row */}
337 <div className="flex flex-wrap items-center gap-x-2 gap-y-1">
338 <h1 className="text-xl font-bold tracking-tight text-fd-foreground">{(toolkit.name?.trim() || toolkit.slug)}</h1>
338 - {toolkit.instant?.supported === true && <InstantBadge />}
339 + {instantSupported && <InstantBadge />}
340 <button
341 onClick={copySlug}
342 className="inline-flex items-center gap-1 rounded bg-fd-muted px-1.5 py-0.5 font-mono text-xs text-fd-muted-foreground transition-colors hover:text-fd-foreground"
@@ -359,7 +360,7 @@ export function ToolkitDetail({ toolkit, tools, triggers, path, faq }: ToolkitDe
360
361 {/* Description */}
362 <p className="mt-1.5 text-sm text-fd-muted-foreground">{toolkit.description}</p>
362 - {toolkit.instant?.supported === true && (
363 + {instantSupported && (
364 <p className="mt-1.5 text-sm text-fd-muted-foreground">
365 <Link href="/docs/instant-tools" className="underline">Instant</Link> is available on the latest version. Check each tool for support and pricing.
366 </p>
docs/content/docs/instant-tools.mdx
+1 -1
@@ -357,7 +357,7 @@ Without an explicit account selection, Composio prefers the user's own connectio
357
358 Session search tells you when an Instant account serves a toolkit. The toolkit's connection status includes `instant_account.allowed_tool_slugs` (`instantAccount.allowedToolSlugs` in TypeScript), which lists the tools that run on it. Any other tool in that toolkit needs the user's own connection.
359
360 -If your project has multi-account selection enabled, you can choose the Instant account explicitly. Pass `account="instant_account"` to Python `session.execute()` or `{ account: "instant_account" }` as TypeScript execution options. The project and Session must permit Instant, and the tool must support it. This route does not fall back to another credential if it fails.
360 +You can choose the Instant account explicitly on any project. Pass `account="instant_account"` to Python `session.execute()` or `{ account: "instant_account" }` as TypeScript execution options. On a single-account project, it must match an active connection for that toolkit in the Session. The project and Session must permit Instant, and the tool must support it. This route does not fall back to another credential if it fails.
361
362 ### Shared-account restrictions and privacy
363
docs/lib/instant.ts
+4
@@ -10,6 +10,10 @@ export const instantSchema = z.object({
10
11 export type Instant = z.infer<typeof instantSchema>;
12
13 +export function toolkitSupportsInstant(instant: Instant, tools: { instant?: Instant }[]): boolean {
14 + return instant?.supported === true || tools.some(tool => tool.instant?.supported === true);
15 +}
16 +
17 export function instantPricingDescription(instant: Instant): string | undefined {
18 if (instant?.supported !== true) return undefined;
19 return instant.price?.description?.trim() || 'Pricing is not available.';
docs/tests/static/instant-catalog.test.ts
+32 -1
@@ -1,10 +1,29 @@
1 import { describe, expect, test } from 'bun:test';
2 -import { instantDiscount, instantPricingDescription, instantSchema } from '../../lib/instant';
2 +import { instantDiscount, instantPricingDescription, instantSchema, toolkitSupportsInstant } from '../../lib/instant';
3 import { readFileSync } from 'node:fs';
4 import { toolFromApi } from '../../lib/toolkit-schema';
5 import { parseNamedItems, transformToolkit } from '../../scripts/generate-toolkits';
6 +import { createElement } from 'react';
7 +import { renderToStaticMarkup } from 'react-dom/server';
8 +import { ToolkitDetail } from '../../components/toolkits/toolkit-detail';
9 +import type { Toolkit } from '../../types/toolkit';
10
11 describe('Instant catalog metadata', () => {
12 + test('toolkit headers show live tool eligibility when the snapshot lacks Instant metadata', () => {
13 + const toolkit: Toolkit = {
14 + slug: 'example', name: 'Example', logo: null, category: null,
15 + description: 'Example toolkit', authSchemes: [], toolCount: 1,
16 + triggerCount: 0, version: null, tools: [], triggers: [],
17 + };
18 + const html = renderToStaticMarkup(createElement(ToolkitDetail, {
19 + toolkit,
20 + tools: [toolFromApi({ slug: 'EXAMPLE_SEARCH', instant: { supported: true } })],
21 + triggers: [], path: '/toolkits/example',
22 + }));
23 + expect(html).toContain('is available on the latest version. Check each tool for support and pricing.');
24 + expect(html.match(/title="Instant is supported on the latest version"/g)).toHaveLength(2);
25 + });
26 +
27 test('missing, false, and partial support never imply eligibility', () => {
28 for (const instant of [undefined, null, {}, { supported: false }, { supported: 'true' }, { price: { description: 'A price' } }]) {
29 const parsed = instantSchema.parse(instant);
@@ -13,6 +32,18 @@ describe('Instant catalog metadata', () => {
32 }
33 });
34
35 + test('toolkit support requires explicit eligibility from the toolkit or at least one tool', () => {
36 + const tools = [
37 + { instant: { supported: false } },
38 + {},
39 + { instant: { price: { description: '$1 per call' } } },
40 + ];
41 + expect(toolkitSupportsInstant(undefined, tools)).toBe(false);
42 + expect(toolkitSupportsInstant({ supported: false }, tools)).toBe(false);
43 + expect(toolkitSupportsInstant(undefined, [...tools, { instant: { supported: true } }])).toBe(true);
44 + expect(toolkitSupportsInstant({ supported: true }, [])).toBe(true);
45 + });
46 +
47 test('missing or malformed pricing is not free', () => {
48 for (const price of [undefined, null, {}, { description: '' }, { description: 0 }]) {
49 expect(instantPricingDescription(instantSchema.parse({ supported: true, price }))).toBe('Pricing is not available.');