Back to Skills

claude-agent-sdk-tool-integration

verified

Use when integrating tools, permissions, and MCP servers with Claude AI agents using the Agent SDK.

View on GitHub

Marketplace

han

TheBushidoCollective/han

Plugin

jutsu-claude-agent-sdk

Technique

Repository

TheBushidoCollective/han
60stars

jutsu/jutsu-claude-agent-sdk/skills/tool-integration/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
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-integration

Installation paths:

Claude
.claude/skills/claude-agent-sdk-tool-integration/
Powered by add-skill CLI

Instructions

# 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: {

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5383 chars

Issues Found:

  • name_directory_mismatch