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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'search' implies a read-only operation, it doesn't address important aspects like performance characteristics, result format, error conditions, or whether this is a local vs remote search. The description is too minimal for a tool with 4 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a search tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 4 parameters and no output schema, the description is insufficient. It doesn't explain what 'semantic search' means in this context, what kind of results to expect, or how results are ranked/returned. Given the complexity of search operations and lack of output schema, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so all parameters are documented in the schema. The description adds no additional parameter information beyond what's already in the schema. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('semantic search') and target resource ('all manuscript content'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from 'holistic_search' or other search-related siblings in the list, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'holistic_search' or other content-finding tools in the sibling list. It lacks any context about appropriate use cases, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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