Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

get_project_readme

Retrieve README content from GitHub projects to understand project documentation and setup requirements.

Instructions

Get the README content of a GitHub project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes

Implementation Reference

  • The core handler method that executes a GraphQL query to fetch the README content for the specified GitHub project.
    async getProjectReadme(data: {
      projectId: string;
    }): Promise<{ readme: string }> {
      try {
        const query = `
          query($projectId: ID!) {
            node(id: $projectId) {
              ... on ProjectV2 {
                readme
              }
            }
          }
        `;
    
        interface GetReadmeResponse {
          node: {
            readme: string | null;
          };
        }
    
        const response = await this.factory.graphql<GetReadmeResponse>(query, {
          projectId: data.projectId
        });
    
        return {
          readme: response.node?.readme || ''
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Zod schema definition and ToolDefinition object for input validation, description, and usage examples.
    export const getProjectReadmeTool: ToolDefinition<GetProjectReadmeArgs> = {
      name: "get_project_readme",
      description: "Get the README content of a GitHub project",
      schema: getProjectReadmeSchema as unknown as ToolSchema<GetProjectReadmeArgs>,
      examples: [
        {
          name: "Get project README",
          description: "Retrieve the README for a project",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH"
          }
        }
      ]
    };
  • Registers the getProjectReadmeTool in the central ToolRegistry singleton instance.
    this.registerTool(getProjectReadmeTool);
  • src/index.ts:274-275 (registration)
    Dispatch handler in main MCP server that routes tool calls to the ProjectManagementService.
    case "get_project_readme":
      return await this.service.getProjectReadme(args);
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/kunwarVivek/mcp-github-project-manager'

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