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

docs: replace hardcoded "1,000+" toolkit counts with the live catalog count

The docs hero, feature cards, site metadata, and llms.txt all hardcoded "1,000+" apps, while the published catalog is 1,327 toolkits (the length of docs/public/data/toolkits-list.json, already rendered by the /toolkits page). Add a server-only helper docs/lib/toolkit-count.ts that imports that same JSON and exports TOOLKIT_COUNT_LABEL = Math.floor(len/100)*100 -> "1,300+", with the locale pinned (toLocaleString('en-US')) so the separator is a comma on any build host. Six server-side files now consume it. No client bundle cost: none of the importers is a "use client" module, so the JSON never reaches the browser. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Tridhatri Vallamkondu committed Aug 25, 2026 at 20:40 UTC 4352f210dcab63154292251eb9d77200c581d129
7 files changed +30 -10
docs/app/layout.tsx
+7 -4
@@ -8,6 +8,7 @@ import { PostHogProvider } from '@/components/posthog-provider';
8 import CustomSearchDialog from '@/components/custom-search-dialog';
9 import { ScrollReset } from '@/components/scroll-reset';
10 import { source, referenceSource } from '@/lib/source';
11 +import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';
12
13 const defaultLinkSlugs: { slug: string[]; source: typeof source }[] = [
14 { slug: ['quickstart'], source },
@@ -24,16 +25,18 @@ const defaultLinks = defaultLinkSlugs.flatMap(({ slug, source: pageSource }) =>
25 return [{ title: page.data.title, description: page.data.description ?? '', href: page.url }];
26 });
27
28 +const SITE_DESCRIPTION = `Build AI agents with ${TOOLKIT_COUNT_LABEL} tools. Connect LLMs to external services like GitHub, Slack, Gmail, and more.`;
29 +
30 export const metadata: Metadata = {
31 title: {
32 default: 'Composio Docs',
33 template: '%s | Composio',
34 },
32 - description: 'Build AI agents with 1000+ tools. Connect LLMs to external services like GitHub, Slack, Gmail, and more.',
35 + description: SITE_DESCRIPTION,
36 metadataBase: new URL('https://docs.composio.dev'),
37 openGraph: {
38 title: 'Composio Docs',
36 - description: 'Build AI agents with 1000+ tools. Connect LLMs to external services like GitHub, Slack, Gmail, and more.',
39 + description: SITE_DESCRIPTION,
40 siteName: 'Composio Docs',
41 type: 'website',
42 images: ['https://og.composio.dev/api/og?title=Composio%20Docs'],
@@ -41,7 +44,7 @@ export const metadata: Metadata = {
44 twitter: {
45 card: 'summary_large_image',
46 title: 'Composio Docs',
44 - description: 'Build AI agents with 1000+ tools. Connect LLMs to external services like GitHub, Slack, Gmail, and more.',
47 + description: SITE_DESCRIPTION,
48 images: ['https://og.composio.dev/api/og?title=Composio%20Docs'],
49 },
50 };
@@ -83,7 +86,7 @@ export default function Layout({ children }: LayoutProps<'/'>) {
86 '@id': 'https://docs.composio.dev/#website',
87 url: 'https://docs.composio.dev',
88 name: 'Composio Docs',
86 - description: 'Build AI agents with 1000+ tools. Connect LLMs to external services like GitHub, Slack, Gmail, and more.',
89 + description: SITE_DESCRIPTION,
90 publisher: { '@id': 'https://composio.dev/#organization' },
91 },
92 {
docs/app/llms-full.txt/route.ts
+2 -1
@@ -9,6 +9,7 @@ import {
9 } from '@/lib/source';
10 import { SESSION_GUARDRAILS } from '@/lib/llm-guardrails';
11 import { detectReferenceApiVersion } from '@/lib/api-version';
12 +import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';
13 import {
14 formatKnowledgeDiscoveryLinks,
15 getLocalKnowledgeDiscoveryPaths,
@@ -165,7 +166,7 @@ export async function GET() {
166 ]);
167
168 const results = [
168 - `# Composio Documentation\n\n> Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.${SESSION_GUARDRAILS}\n# Documentation\n`,
169 + `# Composio Documentation\n\n> Composio powers ${TOOLKIT_COUNT_LABEL} toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.${SESSION_GUARDRAILS}\n# Documentation\n`,
170 ...docsResults,
171 '\n# Knowledge Hub navigation\n',
172 knowledgeDiscoveryLinks,
docs/app/llms.txt/route.ts
+2 -1
@@ -6,6 +6,7 @@ import {
6 knowledgeBaseSource,
7 } from '@/lib/source';
8 import { detectReferenceApiVersion } from '@/lib/api-version';
9 +import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';
10 import {
11 formatKnowledgeDiscoveryLinks,
12 getLocalKnowledgeDiscoveryPaths,
@@ -181,7 +182,7 @@ ${legacyReferencePages.map(formatPage).join('\n')}
182
183 const index = `# Composio Documentation
184
184 -> Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
185 +> Composio powers ${TOOLKIT_COUNT_LABEL} toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
186
187 > **For AI agents:** Route by intent. To build an application, start with [Quickstart](https://docs.composio.dev/docs/quickstart.md) or [Providers](https://docs.composio.dev/docs/providers.md) and use \`composio.create(user_id)\` + \`session.tools()\`. To use Composio from Codex or Claude Code without explicit MCP intent, install the [native agent plugin](https://docs.composio.dev/docs/agent-plugins.md). To connect an existing client over MCP, use [Composio Connect](https://docs.composio.dev/docs/composio-connect.md). When an application creates a session and needs MCP transport, use [Sessions via MCP](https://docs.composio.dev/docs/sessions-via-mcp.md). See any page's .md endpoint for full usage instructions.
188
docs/components/docs-hero-v2.tsx
+3 -1
@@ -1,3 +1,5 @@
1 +import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';
2 +
3 export function DocsHeroV2() {
4 return (
5 <section className="py-10 sm:py-12">
@@ -8,7 +10,7 @@ export function DocsHeroV2() {
10
11 <p className="max-w-[620px] text-base leading-[1.6] text-fd-foreground/70 sm:text-lg">
12 Use Composio to discover tools, authenticate each user, and run
11 - actions across 1,000+ apps.
13 + actions across {TOOLKIT_COUNT_LABEL} apps.
14 </p>
15 </div>
16 </section>
docs/components/home-features.tsx
+3 -2
@@ -3,6 +3,7 @@ import { ArrowUpRight } from 'lucide-react';
3 import type { ReactNode } from 'react';
4 import { AuthDiagram } from './home-auth-diagram';
5 import { MOCK_FADE_STYLE } from './home-shared';
6 +import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';
7
8 const LOGO_CDN = 'https://logos.composio.dev/api';
9 // 10-col × 3-row grid: 29 recognizable toolkit logos plus a brand-tinted
@@ -40,7 +41,7 @@ export function HomeFeatures() {
41 <div className="grid grid-cols-1 gap-6 sm:auto-rows-fr sm:grid-cols-2">
42 <FeatureCard
43 title="Tools that resolve by intent."
43 - description="Smart tool search over 1000+ apps, surfaced just in time with the right scope."
44 + description={`Smart tool search over ${TOOLKIT_COUNT_LABEL} apps, surfaced just in time with the right scope.`}
45 href="/docs/how-composio-works"
46 visual={<ToolkitsVisual />}
47 />
@@ -58,7 +59,7 @@ export function HomeFeatures() {
59 />
60 <FeatureCard
61 title="Run arbitrary code, safely."
61 - description="A sandbox pre-wired with your user's connected accounts and 1000+ tools."
62 + description={`A sandbox pre-wired with your user's connected accounts and ${TOOLKIT_COUNT_LABEL} tools.`}
63 href="/docs/sandbox"
64 visual={<SandboxVisual />}
65 />
docs/components/home-resources.tsx
+2 -1
@@ -9,6 +9,7 @@ import {
9 Wrench,
10 } from 'lucide-react';
11 import type { ReactNode } from 'react';
12 +import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';
13
14 const RESOURCES = [
15 {
@@ -38,7 +39,7 @@ const RESOURCES = [
39 {
40 icon: <Blocks aria-hidden="true" className="size-4" />,
41 title: 'Toolkits',
41 - description: 'Browse the 1000+ apps your agent can act on.',
42 + description: `Browse the ${TOOLKIT_COUNT_LABEL} apps your agent can act on.`,
43 href: '/toolkits',
44 },
45 {
docs/lib/toolkit-count.ts new
+11
@@ -0,0 +1,11 @@
1 +import toolkitsData from '@/public/data/toolkits-list.json';
2 +
3 +// Server-only: reads the full toolkit catalog at build time to derive a
4 +// rounded-down, human-friendly count for marketing copy (hero, metadata,
5 +// llms.txt). Never import this from a "use client" module — that would ship
6 +// the ~1,300-row JSON array to the browser just to read its length.
7 +const roundedToolkitCount = Math.floor(toolkitsData.length / 100) * 100;
8 +
9 +// Pin the locale so the grouping separator is a comma regardless of the build
10 +// host's locale ("1,300+", never "1.300+" or "1 300+").
11 +export const TOOLKIT_COUNT_LABEL = `${roundedToolkitCount.toLocaleString('en-US')}+`;