Skip to main content
Glama

get_project

Retrieve detailed information about a specific GitHub project by providing its project ID, enabling users to access project data for management and analysis.

Instructions

Get details of a specific GitHub project

Input Schema

NameRequiredDescriptionDefault
projectIdYes

Input Schema (JSON Schema)

{ "properties": { "projectId": { "type": "string" } }, "required": [ "projectId" ], "type": "object" }

Implementation Reference

  • Core handler: Executes GraphQL query to fetch GitHub ProjectV2 by ID and maps response to domain Project model.
    async findById(id: ProjectId): Promise<Project | null> { const query = ` query($id: ID!) { node(id: $id) { ... on ProjectV2 { id title shortDescription closed createdAt updatedAt } } } `; const response = await this.graphql<GetProjectResponse>(query, { id }); if (!response.node) return null; const project = response.node; return { id: project.id, type: ResourceType.PROJECT, title: project.title, description: project.shortDescription || "", owner: this.owner, number: parseInt(project.id.split('_').pop() || '0'), url: `https://github.com/orgs/${this.owner}/projects/${parseInt(project.id.split('_').pop() || '0')}`, status: project.closed ? ResourceStatus.CLOSED : ResourceStatus.ACTIVE, visibility: "private", views: [], fields: [], createdAt: project.createdAt, updatedAt: project.updatedAt, closed: project.closed }; }
  • Service layer handler: Delegates get_project tool execution to GitHubProjectRepository.findById.
    async getProject(projectId: string): Promise<Project | null> { try { return await this.projectRepo.findById(projectId); } catch (error) { throw this.mapErrorToMCPError(error); } }
  • MCP dispatcher: Routes 'get_project' tool calls to ProjectManagementService.getProject.
    case "get_project": return await this.service.getProject(args.projectId);
  • Input schema validation: Defines projectId as required string.
    export const getProjectSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), }); export type GetProjectArgs = z.infer<typeof getProjectSchema>;
  • Tool registration: Registers getProjectTool in the central registry for MCP list_tools.
    this.registerTool(getProjectTool);

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/HarshKumarSharma/MCP'

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