Add tool documentation MCP tools for queryable TOOLS.md replacement
- Created tool_docs table with pgvector support (migration 015) - Added 5 MCP tools: tool_doc_add, tool_doc_search, tool_doc_get, tool_doc_list, tool_doc_export - Imported 268 tools from TOOLS.md to database - Enables semantic search for tool documentation (when embeddings available) - Reduces context pollution (TOOLS.md is 11,769 lines, now queryable) Task: CF-249 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -644,6 +644,72 @@ export const toolDefinitions = [
|
||||
},
|
||||
},
|
||||
|
||||
// Tool Documentation Tools
|
||||
{
|
||||
name: 'tool_doc_add',
|
||||
description: 'Add a new tool documentation entry',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
tool_name: { type: 'string', description: 'Tool or command name' },
|
||||
category: { type: 'string', enum: ['mcp', 'cli', 'script', 'internal', 'deprecated'], description: 'Tool category' },
|
||||
title: { type: 'string', description: 'Short descriptive title' },
|
||||
description: { type: 'string', description: 'Detailed description of what the tool does' },
|
||||
usage_example: { type: 'string', description: 'Usage example (optional)' },
|
||||
parameters: { type: 'object', description: 'Parameter definitions (optional)' },
|
||||
notes: { type: 'string', description: 'Additional notes, gotchas, tips (optional)' },
|
||||
tags: { type: 'array', items: { type: 'string' }, description: 'Searchable tags (optional)' },
|
||||
source_file: { type: 'string', description: 'Original source file (optional)' },
|
||||
},
|
||||
required: ['tool_name', 'category', 'title', 'description'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'tool_doc_search',
|
||||
description: 'Search tool documentation semantically',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
query: { type: 'string', description: 'Search query' },
|
||||
category: { type: 'string', enum: ['mcp', 'cli', 'script', 'internal', 'deprecated'], description: 'Filter by category (optional)' },
|
||||
tags: { type: 'array', items: { type: 'string' }, description: 'Filter by tags (optional)' },
|
||||
limit: { type: 'number', description: 'Max results (default: 5)' },
|
||||
},
|
||||
required: ['query'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'tool_doc_get',
|
||||
description: 'Get specific tool documentation by name',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
tool_name: { type: 'string', description: 'Tool or command name' },
|
||||
},
|
||||
required: ['tool_name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'tool_doc_list',
|
||||
description: 'List tool documentation entries',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
category: { type: 'string', enum: ['mcp', 'cli', 'script', 'internal', 'deprecated'], description: 'Filter by category (optional)' },
|
||||
tag: { type: 'string', description: 'Filter by tag (optional)' },
|
||||
limit: { type: 'number', description: 'Max results (default: 20)' },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'tool_doc_export',
|
||||
description: 'Export all tool documentation as markdown (for backup/migration)',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
},
|
||||
},
|
||||
|
||||
// Session Management Tools
|
||||
{
|
||||
name: 'session_start',
|
||||
|
||||
Reference in New Issue
Block a user