Skip to main content
Glama

search_content

Search manuscript content semantically to find relevant information across your writing project files using natural language queries.

Instructions

Semantic search across all manuscript content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
queryYesSearch query
scopeNoFile scope pattern (e.g., 'chapters/*.md')
limitNoMaximum results

Implementation Reference

  • Handler function that executes the MCP 'search_content' tool logic by parsing input arguments and delegating to WritersAid.searchContent
    private async searchContent(args: Record<string, unknown>) { const query = args.query as string; const scope = args.scope as string | undefined; const limit = (args.limit as number) || 10; return this.writersAid.searchContent(query, { scope, limit }); }
  • MCP tool schema definition for 'search_content' including name, description, and inputSchema validation
    { name: "search_content", description: "Semantic search across all manuscript content", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" }, query: { type: "string", description: "Search query" }, scope: { type: "string", description: "File scope pattern (e.g., 'chapters/*.md')" }, limit: { type: "number", description: "Maximum results", default: 10 }, }, required: ["query"], }, },
  • src/index.ts:73-75 (registration)
    MCP server registration of tool list handler that provides all tool schemas including 'search_content'
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: writerToolDefinitions, }));
  • src/index.ts:86-92 (registration)
    MCP server registration of tool call handler that instantiates WriterToolHandlers and dispatches to specific tool handler for 'search_content'
    const writersAid = new WritersAid({ projectPath }); const handlers = new WriterToolHandlers(writersAid); // Call the tool const result = await handlers.handleTool(name, args || {}); // Close the connection after use
  • Supporting method in WritersAid class that performs the actual content search by delegating to ManuscriptSearch
    async searchContent(query: string, options?: { scope?: string; limit?: number }) { return this.search.search(query, options); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaolai/claude-writers-aid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server