Skip to main content
Glama

search_repository

Search GitHub repositories on Google CodeWiki to find and access documentation using repository names or owner/repo queries.

Instructions

Search for a GitHub repository on Google CodeWiki

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for repository name or owner/repo format

Implementation Reference

  • Input schema definition for the 'search_repository' tool.
    {
      name: 'search_repository',
      description: 'Search for a GitHub repository on Google CodeWiki',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query for repository name or owner/repo format',
          },
        },
        required: ['query'],
      },
    },
  • MCP server handler for 'search_repository' tool: validates input, delegates to CodeWikiClient.searchRepository, formats and returns results.
    case 'search_repository': {
      const query = (args as any)?.query;
      if (!query) {
        throw new Error('Query is required');
      }
      const results = await codeWikiClient.searchRepository(query);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(results, null, 2),
          },
        ],
      };
    }
  • Core logic for searching repositories: parses owner/repo queries, falls back to filtering featured repositories from CodeWiki.
    async searchRepository(query: string): Promise<{ repositories: RepositoryInfo[]; query: string }> {
      // Since CodeWiki doesn't have a public search API, we'll simulate search
      // by checking if the query matches known repositories or parsing search results
      const repositories: RepositoryInfo[] = [];
    
      // Try to parse the query as owner/repo format
      if (query.includes('/')) {
        const [owner, repo] = query.split('/');
        if (owner && repo) {
          const repoInfo = await this.getRepositoryInfo(owner.trim(), repo.trim());
          if (repoInfo) {
            repositories.push(repoInfo);
          }
        }
      }
    
      // If no exact match, try to search the CodeWiki homepage for featured repos
      if (repositories.length === 0) {
        const featuredRepos = await this.getFeaturedRepositories();
        const filtered = featuredRepos.filter(repo => 
          repo.repo.toLowerCase().includes(query.toLowerCase()) ||
          repo.owner.toLowerCase().includes(query.toLowerCase()) ||
          (repo.description && repo.description.toLowerCase().includes(query.toLowerCase()))
        );
        repositories.push(...filtered);
      }
    
      return {
        repositories,
        query,
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Search' implies a read operation, the description doesn't disclose whether this requires authentication, has rate limits, what the return format looks like, whether it searches live data or cached repositories, or any other behavioral traits. For a search tool with zero annotation coverage, this is inadequate.

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 unnecessary words. It's appropriately sized for a simple 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 no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'Google CodeWiki' is, what kind of results to expect, whether this searches across all GitHub or a specific subset, or how results are returned. The lack of output schema means the description should compensate by explaining return values, which it doesn't do.

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' already documented in the schema as 'Search query for repository name or owner/repo format'. The description doesn't add any additional semantic context about parameter usage beyond what the schema provides, so the baseline score of 3 is appropriate.

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 ('a GitHub repository on Google CodeWiki'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'search_documentation' or 'list_cached_repositories' - it's unclear if this searches across all repositories or only cached ones, or how it differs from documentation search.

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?

No guidance is provided about when to use this tool versus alternatives. With sibling tools like 'search_documentation', 'list_cached_repositories', and 'get_repository_docs', the description offers no context about when this repository search is appropriate versus those other search/list operations.

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/cbuntingde/codewiki-mcp-server'

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