Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ComposioHQ/composio/llms.txt

Use this file to discover all available pages before exploring further.

Tools are the actions your agent takes — “fetch emails”, “create a GitHub issue”, “send a Slack message”. Each tool maps to a specific API operation and carries a JSON Schema that describes its inputs and outputs. Toolkits group related tools for a single service: the github toolkit contains GITHUB_CREATE_ISSUE, GITHUB_GET_REPOS, GITHUB_LIST_PULL_REQUESTS, and hundreds more. Composio automatically converts each tool’s schema into the format expected by your AI provider.

Getting tools

Use composio.tools.get() to retrieve tools in your provider’s format. You must provide a user ID so Composio can scope authentication to that user’s connected accounts. By toolkit:
import { Composio } from '@composio/core';
import { OpenAIProvider } from '@composio/openai';

const composio = new Composio({
  apiKey: process.env.COMPOSIO_API_KEY,
  provider: new OpenAIProvider(),
});

// Get the most important tools from a toolkit
const tools = await composio.tools.get("user_123", {
  toolkits: ["github"],
});

// Get tools from multiple toolkits
const multiTools = await composio.tools.get("user_123", {
  toolkits: ["github", "gmail", "slack"],
});
By specific tool slug:
// Get one specific tool
const tool = await composio.tools.get("user_123", "GITHUB_CREATE_ISSUE");

// Get several specific tools
const tools = await composio.tools.get("user_123", {
  tools: ["GITHUB_CREATE_ISSUE", "GMAIL_FETCH_EMAILS", "SLACK_SEND_MESSAGE"],
});
When you fetch tools by toolkit without a limit, Composio automatically applies an important filter to return only the most relevant tools. This avoids overloading the model’s context. Pass important: false to disable this behavior and receive all tools.

Executing a tool directly

Use composio.tools.execute() to call a tool without involving an AI model — useful for scripting, testing, and batch workflows.
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY });

const result = await composio.tools.execute("GITHUB_CREATE_ISSUE", {
  userId: "user_123",
  arguments: {
    owner: "my-org",
    repo: "my-repo",
    title: "Bug: Login fails on Safari",
    body: "Steps to reproduce...",
  },
  dangerouslySkipVersionCheck: true,
});

console.log(result.successful); // true
console.log(result.data);       // { number: 42, html_url: "..." }
The ToolExecuteResponse contains:
FieldTypeDescription
successfulbooleanWhether the tool call succeeded
dataRecord<string, unknown>App-specific response payload
errorstring | nullError message if successful is false
logIdstringComposio log ID for debugging
Direct tool execution requires a pinned toolkit version to prevent unexpected behavior when new toolkit versions are released. Either pass version explicitly (e.g., "20250909_00") or set dangerouslySkipVersionCheck: true when using latest. See the observability guide for how to inspect log IDs.

Listing available toolkits

Use composio.toolkits.get() to explore the Composio toolkit catalog.
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY });

// List all toolkits
const { items } = await composio.toolkits.get({});
items.forEach((tk) => console.log(tk.slug, tk.name));

// Get a specific toolkit and its auth details
const github = await composio.toolkits.get("github");
console.log(github.name);              // "GitHub"
console.log(github.authConfigDetails); // OAuth2 config details
You can filter by category to narrow results:
const devTools = await composio.toolkits.get({
  category: "developer-tools",
});

Filtering by tags

Tags let you narrow a tool set by usage pattern without listing specific slugs. Common tag values:
TagDescription
importantHigh-signal tools most commonly used by agents (applied automatically when fetching by toolkit)
readNon-mutating tools — list, get, search operations
writeMutating tools — create, update, delete operations
// Only read-only tools from GitHub
const readTools = await composio.tools.get("user_123", {
  toolkits: ["github"],
  tags: ["read"],
});

// Only write tools — useful for an agent that should only mutate data
const writeTools = await composio.tools.get("user_123", {
  toolkits: ["gmail"],
  tags: ["write"],
});
You can also search across all toolkits by keyword:
const results = await composio.tools.get("user_123", {
  search: "create pull request",
});

Tool schemas

Every Composio tool carries a JSON Schema describing its inputs and outputs. Composio automatically converts these schemas into the format your AI provider expects — OpenAI function-calling objects, Anthropic tool definitions, LangChain tools, and so on. You can inspect a tool’s raw schema before passing it to a model:
const tool = await composio.tools.getRawComposioToolBySlug("GITHUB_CREATE_ISSUE");

console.log(tool.slug);            // "GITHUB_CREATE_ISSUE"
console.log(tool.name);            // "Create Issue"
console.log(tool.description);     // "Creates a new issue in a GitHub repo"
console.log(tool.inputParameters); // JSON Schema object
You can also modify schemas at fetch time using modifySchema to add custom metadata or rephrase descriptions for your model:
const tools = await composio.tools.get("user_123", {
  toolkits: ["github"],
}, {
  modifySchema: ({ toolSlug, toolkitSlug, schema }) => ({
    ...schema,
    description: `[${toolkitSlug.toUpperCase()}] ${schema.description}`,
  }),
});

Custom Tools

Register your own tools alongside Composio tools

Tool Router

Route tool calls through sessions for dynamic discovery

Connected Accounts

Manage the credentials tools use when they execute

Providers Overview

See all supported AI framework providers

Build docs developers (and LLMs) love