Skip to main content
Glama

get_project

Retrieve detailed project information by providing its unique three-letter slug identifier to access specific project data.

Instructions

Retrieves detailed information about a specific project using its unique 'slug' (three uppercase letters, e.g., 'CRD').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes

Implementation Reference

  • The `execute` method implements the core handler logic for the `get_project` tool, fetching project details from the API via slug and returning structured data or error.
    async execute(input: GetProjectInput): Promise<unknown> {
      logger.info('Executing get-project tool', input);
    
      try {
        // Use the injected API client to get project by slug
        if (!this.apiClient) {
          throw new Error('API client not available - tool not properly initialized');
        }
    
        const url = `/project/slug/${input.slug.toUpperCase()}`;
        logger.debug(`Making GET request to: ${url}`);
        
        const responseData = await this.apiClient.get<ProjectApiResponse>(url) as unknown as ProjectApiResponse;
        
        // Return project data according to the new schema
        return {
          slug: responseData?.slug || '', 
          name: responseData?.name || '',
          description: responseData?.description || '',
          projectKnowledge: responseData?.projectKnowledge || {}, // Changed to camelCase
          projectDiagram: responseData?.projectDiagram || '', // Changed to camelCase
          projectStandards: responseData?.projectStandards || {} // Assuming project_standards is also camelCase from API
        };
      } catch (error) {
        const errorMessage = (error instanceof Error) ? error.message : 'An unknown error occurred';
        logger.error(`Error in get-project tool: ${errorMessage}`, error instanceof Error ? error : undefined);
        
        return {
          isError: true,
          content: [{ type: "text", text: errorMessage }]
        };
      }
    }
  • Zod input schema validation for the `get_project` tool, enforcing a required three-letter project slug.
    const GetProjectSchema = z.object({
      // Project slug (URL-friendly identifier)
      slug: z.string({
        required_error: "Project slug is required"
      })
        .regex(/^[A-Za-z]{3}$/, { message: "Project slug must be three letters (e.g., CRD or crd). Case insensitive." }),
    }).strict();
  • src/index.ts:315-330 (registration)
    Tool instantiation (`new GetProjectTool`) and registration with MCP server via `tool.register(server)` in the production server setup.
    const tools: any[] = [
      new StartProjectTool(secureApiClient),
      new GetPromptTool(secureApiClient),
      new GetTaskTool(secureApiClient),
      new GetProjectTool(secureApiClient),
      new UpdateTaskTool(secureApiClient),
      new UpdateProjectTool(secureApiClient),
      new ListProjectsTool(secureApiClient),
      new ListTasksTool(secureApiClient),
      new NextTaskTool(secureApiClient),
    ];
    
    // Register each tool with the server
    tools.forEach(tool => {
      tool.register(server);
    });
  • MCP tool definition including input schema, used for tool registration and discovery.
    getMCPToolDefinition(): MCPToolDefinition {
      return {
        name: this.name,
        description: this.description,
        annotations: this.annotations,
        inputSchema: {
          type: "object",
          properties: {
            slug: {
              type: "string",
              pattern: "^[A-Za-z]{3}$",
              description: "The unique three-letter identifier for the project (e.g., 'CRD' or 'crd'). Case insensitive - will be converted to uppercase."
            }
          },
          required: ["slug"],
          additionalProperties: false
        }
      };
    }
  • src/index.ts:25-25 (registration)
    Import of the GetProjectTool class required for instantiation and registration.
    import { GetProjectTool } from './tools/get-project.js';
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. It states it 'retrieves' information, implying a read-only operation, but does not disclose behavioral traits like error handling, response format, or whether it requires authentication. For a tool with no annotations, this is a significant gap.

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 front-loads the purpose and includes necessary parameter details. There is no wasted text, and it is appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given no annotations and no output schema, the description is incomplete as it does not explain return values or error cases. However, it adequately covers the purpose and parameter semantics for a simple retrieval tool, making it minimally viable but with clear gaps.

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

Parameters5/5

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

The input schema has 0% description coverage, so the description fully compensates by explaining the 'slug' parameter as a 'unique' identifier with a specific format ('three uppercase letters, e.g., 'CRD''). This adds crucial meaning beyond the schema's pattern constraint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('retrieves') and resource ('detailed information about a specific project'), and distinguishes it from siblings like 'list_projects' by specifying it's for a single project using a slug. It's specific about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use it (to get details for a specific project by slug) versus alternatives like 'list_projects' for multiple projects, but does not explicitly name alternatives or state exclusions. It provides clear context for usage.

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/PixdataOrg/coderide-mcp'

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