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); }

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