Skip to main content
Glama

list_project_fields

Retrieve all field definitions from a GitHub project to understand its structure and available data points for project management.

Instructions

List all fields in a GitHub project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes

Implementation Reference

  • The core handler function that implements the list_project_fields tool logic. It fetches the specified GitHub project using the project repository and returns its custom fields array, handling errors appropriately.
    async listProjectFields(data: {
      projectId: string;
    }): Promise<CustomField[]> {
      try {
        const project = await this.projectRepo.findById(data.projectId);
        if (!project) {
          throw new ResourceNotFoundError(ResourceType.PROJECT, data.projectId);
        }
        return project.fields || [];
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Zod schema definition for validating the input arguments to the list_project_fields tool (requires projectId).
    // Schema for list_project_fields tool
    export const listProjectFieldsSchema = z.object({
      projectId: z.string().min(1, "Project ID is required"),
    });
    
    export type ListProjectFieldsArgs = z.infer<typeof listProjectFieldsSchema>;
  • Registration of the listProjectFieldsTool in the central ToolRegistry during initialization of built-in tools.
    this.registerTool(listProjectFieldsTool);
  • Dispatcher in the main MCP server that routes call_tool requests for list_project_fields to the ProjectManagementService handler.
    case "list_project_fields":
      return await this.service.listProjectFields(args);
  • Full tool definition including name, description, schema reference, and usage examples for MCP tool listing and validation.
    export const listProjectFieldsTool: ToolDefinition<ListProjectFieldsArgs> = {
      name: "list_project_fields",
      description: "List all fields in a GitHub project",
      schema: listProjectFieldsSchema as unknown as ToolSchema<ListProjectFieldsArgs>,
      examples: [
        {
          name: "List project fields",
          description: "Get all fields for a specific project",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH"
          }
        }
      ]
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it lists fields without disclosing behavioral traits like pagination, rate limits, error handling, or response format. It mentions 'all fields' but doesn't clarify if this includes archived or hidden fields, leaving gaps in transparency.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized for a simple list operation, earning full marks for conciseness.

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 tool's moderate complexity (listing fields in a project), no annotations, no output schema, and low parameter coverage, the description is incomplete. It lacks details on return values, error cases, or operational constraints, making it inadequate for full agent understanding.

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

Parameters3/5

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

Schema description coverage is 0%, but the description adds no parameter semantics beyond implying a 'projectId' is needed. It doesn't explain what 'projectId' refers to (e.g., numeric ID, name) or format requirements, so it doesn't compensate for the low coverage, resulting in a baseline score.

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 action ('List all fields') and resource ('in a GitHub project'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get_field_value' or 'update_project_field', which prevents a score of 5.

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 like 'get_field_value' or 'create_project_field'. It lacks context about prerequisites, such as needing an existing project, or exclusions, leaving the agent with minimal usage direction.

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