TypeScript SDK Reference
Comprehensive reference for the TypeScript Agent SDK with functions, types, and interfaces for programmatic Claude Code interactions
Security Assessment
Detected risks:
About TypeScript SDK Reference
The TypeScript SDK Reference is a comprehensive guide for building applications using the Anthropic Agent SDK in TypeScript, enabling seamless interactions with Claude Code and custom tool integrations. This SDK empowers developers to leverage Claude's advanced capabilities for programmatic queries, multi-turn conversations, and tool integration in Node.js environments. It provides a robust framework for creating custom tools and servers, facilitating easy interaction between Claude Code and user-defined tools through the use of type-safe APIs and schemas.
FAQ
How do I install the TypeScript SDK?
You can install the SDK by running `npm install @anthropic-ai/claude-agent-sdk`.
What are the core functions of the SDK?
The core functions of the SDK include `query()` for Claude Code interactions, `tool()` for defining custom tools, and `createSdkMcpServer()` for hosting in-process MCP servers.
Can I use this SDK to integrate custom tools?
Yes, the `tool()` function allows you to define custom tools using Zod schemas and integrate them into your application.
What are the configuration options available in the SDK?
The SDK offers essential configuration options like `allowedTools`, `model`, and `abortController`, as well as advanced options like `systemPrompt`, `agents`, and `mcpServers`.
Is there any limitation in terms of tool compatibility?
The SDK allows you to restrict or block specific tools via the `allowedTools` and `disallowedTools` options, giving you control over the tools used during interactions.
Install TypeScript SDK Reference
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
CaptainCrouton89/.claude