Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

list_projects

Retrieve GitHub projects with specified status filters to manage workflows and track progress in project management systems.

Instructions

List GitHub projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
limitNo

Implementation Reference

  • Core handler logic for list_projects tool: fetches all projects from repository, filters by status (active/closed/all), applies limit, handles errors.
    async listProjects(status: string = 'active', limit: number = 10): Promise<Project[]> {
      try {
        const projects = await this.projectRepo.findAll();
    
        // Filter by status if needed
        let filteredProjects = projects;
        if (status !== 'all') {
          const resourceStatus = status === 'active' ? ResourceStatus.ACTIVE : ResourceStatus.CLOSED;
          filteredProjects = projects.filter(project => project.status === resourceStatus);
        }
    
        // Apply limit
        return filteredProjects.slice(0, limit);
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Registers the listProjectsTool in the central ToolRegistry singleton during initialization.
    this.registerTool(listProjectsTool);
  • Defines the complete ToolDefinition for list_projects including name, description, Zod input schema (status: enum['active','closed','all'], limit?: number), and usage examples.
    export const listProjectsTool: ToolDefinition<ListProjectsArgs> = {
      name: "list_projects",
      description: "List GitHub projects",
      schema: listProjectsSchema as unknown as ToolSchema<ListProjectsArgs>,
      examples: [
        {
          name: "List active projects",
          description: "List all active GitHub projects",
          args: {
            status: "active",
            limit: 5
          }
        }
      ]
    };
  • MCP server request handler dispatches call_tool 'list_projects' to ProjectManagementService.listProjects after validation.
    case "list_projects":
      return await this.service.listProjects(args.status, args.limit);
  • GitHubProjectRepository.findAll(): Executes GraphQL query to fetch up to 100 ProjectsV2 from repository/org, converts GitHub response to domain Project objects.
    async findAll(): Promise<Project[]> {
      const query = `
        query($owner: String!, $repo: String!) {
          repository(owner: $owner, name: $repo) {
            projectsV2(first: 100) {
              nodes {
                id
                title
                shortDescription
                closed
                createdAt
                updatedAt
              }
            }
          }
        }
      `;
    
      const response = await this.graphql<ListProjectsResponse>(query, {
        owner: this.owner,
        repo: this.repo,
      });
    
      return response.repository.projectsV2.nodes.map((project: GitHubProject) => ({
        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
      }));
    }
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but provides almost none. 'List GitHub projects' doesn't indicate whether this is a read-only operation, what permissions are required, whether it's paginated, what format the output takes, or any rate limits. For a tool with 2 parameters and no output schema, this leaves critical behavioral aspects unspecified.

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 maximally concise at just three words, with no wasted language. It's front-loaded with the core action and resource. While this conciseness comes at the expense of completeness, as a standalone statement it's efficiently structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 2 parameters with 0% schema coverage, no annotations, no output schema, and many sibling tools, the description is completely inadequate. It doesn't explain what the tool returns, how to use its parameters, when to choose it over alternatives, or any behavioral characteristics. For a listing tool in a complex GitHub project management context, this leaves too many gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides zero information about the tool's 2 parameters (status and limit), despite 0% schema description coverage. The schema shows 'status' is required and 'limit' is optional, but the description doesn't explain what values 'status' accepts, what it filters by, what 'limit' controls, or their expected formats. With no parameter guidance in either schema or description, this is inadequate.

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 'List GitHub projects' clearly states the verb ('List') and resource ('GitHub projects'), making the tool's purpose immediately understandable. It distinguishes this as a read operation rather than a creation or modification tool. However, it doesn't specify what aspects of projects are listed or how they differ from other list tools like 'list_project_items' or 'list_project_views'.

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. With many sibling tools like 'get_project', 'list_project_items', and 'list_project_views', there's no indication of when this specific listing tool is appropriate versus those other options. No prerequisites, exclusions, or comparison context is provided.

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/kunwarVivek/mcp-github-project-manager'

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