Skip to main content
Glama

list_projects

Retrieve GitHub projects based on their status to manage and organize development workflows efficiently.

Instructions

List GitHub projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
limitNo

Implementation Reference

  • Core handler function for the 'list_projects' tool. Fetches all projects from the GitHubProjectRepository, filters by status ('active', 'closed', or 'all'), applies the limit, and returns the list.
    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);
      }
    }
  • Zod schema definition for 'list_projects' tool input validation, defining 'status' and 'limit' parameters.
    // Schema for list_projects tool
    export const listProjectsSchema = z.object({
      status: z.enum(["active", "closed", "all"]).default("active"),
      limit: z.number().int().positive().default(10).optional(),
    });
    
    export type ListProjectsArgs = z.infer<typeof listProjectsSchema>;
  • Registration of the 'list_projects' tool in the central ToolRegistry during built-in tools initialization.
    this.registerTool(createProjectTool);
    this.registerTool(listProjectsTool);
    this.registerTool(getProjectTool);
  • Tool definition object for 'list_projects' including name, description, schema reference, and usage examples, exported for registry.
    export const listProjectsTool: ToolDefinition<ListProjectsArgs> = {
      name: "list_projects",
  • Dispatch handler in main server that routes 'list_projects' tool calls to the ProjectManagementService.listProjects method.
    case "list_projects":
      return await this.service.listProjects(args.status, args.limit);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List GitHub projects' implies a read-only operation, but it doesn't specify whether this requires authentication, how results are returned (e.g., pagination, format), or any rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 extremely concise at three words, with no wasted language. It's front-loaded with the core action and resource, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

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?

Given the complexity (a listing operation with 2 parameters, 1 required), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't explain what the tool returns, how parameters affect results, or behavioral constraints, leaving the agent with insufficient context to use it effectively.

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

Parameters2/5

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

Schema description coverage is 0%, meaning neither parameter ('status' and 'limit') is documented in the schema. The description provides no information about these parameters—what 'status' values are valid, what 'limit' controls, or their expected formats. With two undocumented parameters, the description fails to compensate for the schema's lack of documentation.

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 verb ('List') and resource ('GitHub projects'), making the purpose immediately understandable. However, it doesn't distinguish this from sibling tools like 'get_project' (singular) or 'list_project_items', which might list items within projects rather than projects themselves.

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 siblings like 'get_project' (singular retrieval) and 'list_project_items' (listing items within projects), there's no indication of when this list operation is preferred or what distinguishes it from other listing tools in the context.

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

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