Skip to main content
Glama

get_repository_docs

Retrieve GitHub repository documentation by specifying owner and repository name to access project information and guides.

Instructions

Get documentation for a specific GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner/organization
repoYesRepository name
force_refreshNoForce refresh cached documentation

Implementation Reference

  • MCP tool handler for 'get_repository_docs' that validates input, calls CodeWikiClient.getRepositoryDocs, and returns the parsed documentation as JSON text content.
    case 'get_repository_docs': {
      const { owner, repo, force_refresh = false } = args as any;
      if (!owner || !repo) {
        throw new Error('Owner and repo are required');
      }
      const docs = await codeWikiClient.getRepositoryDocs(owner, repo, force_refresh);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(docs, null, 2),
          },
        ],
      };
    }
  • src/server.ts:56-77 (registration)
    Tool registration in ListTools handler, including name, description, and input schema definition.
      name: 'get_repository_docs',
      description: 'Get documentation for a specific GitHub repository',
      inputSchema: {
        type: 'object',
        properties: {
          owner: {
            type: 'string',
            description: 'Repository owner/organization',
          },
          repo: {
            type: 'string',
            description: 'Repository name',
          },
          force_refresh: {
            type: 'boolean',
            description: 'Force refresh cached documentation',
            default: false,
          },
        },
        required: ['owner', 'repo'],
      },
    },
  • TypeScript interface defining the structure of the parsed documentation returned by the tool.
    export interface ParsedDocumentation {
      repository: RepositoryInfo;
      sections: DocumentationSection[];
      lastUpdated: Date;
      metadata: {
        totalSections: number;
        hasDiagrams: boolean;
        hasApiDocs: boolean;
        hasArchitecture: boolean;
      };
    }
  • Main helper method implementing the logic to retrieve (cached or fresh), parse, and return repository documentation via CodeWikiClient.
    async getRepositoryDocs(owner: string, repo: string, forceRefresh = false): Promise<ParsedDocumentation> {
      // Check cache first unless force refresh
      if (!forceRefresh) {
        const cached = await this.cacheManager.get(owner, repo);
        if (cached) {
          return this.parseCachedDocumentation(cached);
        }
      }
    
      // Fetch fresh documentation
      const documentation = await this.fetchDocumentation(owner, repo);
      
      // Cache the raw content
      await this.cacheManager.set(owner, repo, documentation);
      
      return this.parseDocumentation(documentation);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but provides minimal information. It mentions 'documentation' but doesn't specify what format is returned (e.g., README, wiki pages, API docs), whether authentication is required, if there are rate limits, or how the 'force_refresh' parameter affects behavior. The description doesn't contradict annotations since none exist, but it fails to provide adequate behavioral context.

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, clear sentence that efficiently communicates the core purpose without unnecessary words. It's appropriately sized for a simple retrieval tool and front-loads the essential information. Every word earns its place in this concise formulation.

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 tool with 3 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what 'documentation' means in this context, what format the results take, whether authentication is needed, or how errors are handled. The presence of a 'force_refresh' parameter suggests caching behavior that should be explained but isn't addressed in the description.

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%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain what 'documentation' encompasses or provide examples of owner/repo values. 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 ('Get documentation') and resource ('for a specific GitHub repository'), making the purpose immediately understandable. It distinguishes from siblings like 'search_documentation' by focusing on retrieval for a specific repo rather than searching across repos. However, it doesn't explicitly differentiate from 'list_cached_repositories' which might also involve documentation access.

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. It doesn't mention when to choose this over 'search_documentation' for finding docs, or how it relates to 'list_cached_repositories' which might show cached documentation. There's no indication of prerequisites, error conditions, or typical use cases.

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