Use when integrating tools, permissions, and MCP servers with Claude AI agents using the Agent SDK.
View on GitHubTheBushidoCollective/han
jutsu-claude-agent-sdk
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-claude-agent-sdk/skills/tool-integration/SKILL.md -a claude-code --skill claude-agent-sdk-tool-integrationInstallation paths:
.claude/skills/claude-agent-sdk-tool-integration/# Claude Agent SDK - Tool Integration
Working with tools, permissions, and MCP (Model Context Protocol) servers in the Claude Agent SDK.
## Tool Permissions
### Allowing Specific Tools
```typescript
import { Agent } from '@anthropic-ai/claude-agent-sdk';
const agent = new Agent({
allowedTools: [
'read_file',
'write_file',
'list_files',
'grep',
'bash',
],
});
```
### Blocking Tools
```typescript
const agent = new Agent({
disallowedTools: ['bash', 'web_search'],
});
```
### Permission Modes
```typescript
// Strict mode - requires explicit user approval
const agent = new Agent({
permissionMode: 'strict',
});
// Permissive mode - auto-approves known safe operations
const agent = new Agent({
permissionMode: 'permissive',
});
```
## Custom Tools
### Defining Custom Tools
```typescript
import { Agent, Tool } from '@anthropic-ai/claude-agent-sdk';
const customTool: Tool = {
name: 'get_weather',
description: 'Get current weather for a location',
input_schema: {
type: 'object',
properties: {
location: {
type: 'string',
description: 'City name',
},
},
required: ['location'],
},
execute: async (input) => {
const { location } = input;
// Call weather API
return {
location,
temperature: 72,
conditions: 'sunny',
};
},
};
const agent = new Agent({
tools: [customTool],
});
```
### Tool Execution Context
```typescript
const customTool: Tool = {
name: 'read_database',
description: 'Query the database',
input_schema: {
type: 'object',
properties: {
query: { type: 'string' },
},
required: ['query'],
},
execute: async (input, context) => {
// Context provides agent state and utilities
console.log('Agent model:', context.model);
const result = await runQuery(input.query);
return result;
},
};
```
## MCP Server Integration
### Adding MCP Servers
```typescript
const agent = new Agent({
mcpServers: {Issues Found: