Skip to main content
Glama
kylegrahammatzen

Tambo Docs MCP Server

search_docs

Find relevant documentation pages by searching for specific terms in Tambo documentation. Use this tool to locate technical information quickly when working with Tambo systems.

Instructions

Search for documentation pages containing specific terms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find relevant documentation

Implementation Reference

  • Core handler function for the 'search_docs' tool. Ensures documentation sections are discovered, iterates through sections, fetches content, searches for query matches, extracts snippets, and formats results as text response.
    async searchDocs(query: string): Promise<CallToolResult> {
      if (!query) {
        throw new Error('Search query is required');
      }
    
      await this.ensureSectionsLoaded();
      
      const results: SearchResult[] = [];
      
      const sectionsToSearch = this.sections.length > 0 ? this.sections : [
        { path: '/getting-started/quickstart', title: 'Quickstart' },
        { path: '/concepts/components', title: 'Components' },
        { path: '/api-reference/react-hooks', title: 'React Hooks' },
      ];
      
      for (const section of sectionsToSearch) {
        try {
          const response = await this.fetchDocs(section.path);
          const textContent = response.content[0] && 'text' in response.content[0] ? response.content[0].text : '';
          const content = String(textContent || '').toLowerCase();
          
          if (content.includes(query.toLowerCase())) {
            results.push({
              path: section.path,
              title: section.title,
              category: section.category,
              snippet: this.extractSnippet(content, query)
            });
          }
        } catch (error) {
          console.error(`Error searching ${section.path}:`, error instanceof Error ? error.message : String(error));
        }
      }
    
      return {
        content: [
          {
            type: 'text',
            text: results.length > 0 
              ? `Found ${results.length} results for "${query}":\n\n${results.map(r => 
                  `**${r.title}** (${r.path})${r.category ? ` [${r.category}]` : ''}\n${r.snippet}\n`
                ).join('\n')}`
              : `No results found for "${query}"`,
          },
        ],
      };
    }
  • src/server.ts:50-62 (registration)
    Tool registration in the listTools response, including name, description, and input schema for 'search_docs'.
      name: 'search_docs',
      description: 'Search for documentation pages containing specific terms',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query to find relevant documentation',
          },
        },
        required: ['query'],
      },
    },
  • src/server.ts:90-91 (registration)
    Dispatch logic in the callTool handler that routes 'search_docs' calls to the DocHandler's searchDocs method.
    case 'search_docs':
      return await this.docHandler.searchDocs(args?.query as string);
  • Input schema definition for the 'search_docs' tool, specifying a required 'query' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        query: {
          type: 'string',
          description: 'Search query to find relevant documentation',
        },
      },
      required: ['query'],
    },
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. It states the tool searches but doesn't describe how results are returned (e.g., format, pagination), performance traits (e.g., rate limits), or error conditions. This leaves significant gaps for a tool with unspecified behavior.

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 directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with every part contributing to understanding.

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?

Given no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, result format, and usage context relative to siblings. For a search tool with undefined output and behavior, this minimal description is insufficient.

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?

Schema description coverage is 100%, with the single parameter 'query' documented in the schema as 'Search query to find relevant documentation'. The description adds no additional meaning beyond this, such as query syntax or examples, so it meets the baseline for high schema coverage.

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 ('Search for') and resource ('documentation pages') with a specific purpose ('containing specific terms'). It distinguishes from siblings like 'fetch_docs' or 'list_sections' by emphasizing search functionality, though it doesn't explicitly name alternatives.

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 siblings like 'discover_docs' or 'fetch_docs'. It implies usage for finding documentation with search terms but offers no explicit context, 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/kylegrahammatzen/tambo-mcp-server'

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