Skip to main content
Glama

getProjectDetails

Retrieve comprehensive project details using an API key and project ID to access specific information through the DeepWriter MCP Server interface.

Instructions

Get detailed information about a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesThe DeepWriter API key for authentication.
project_idYesThe ID of the project to retrieve details for.

Implementation Reference

  • The main handler for the 'getProjectDetails' MCP tool. It validates inputs, calls the DeepWriter API client, transforms the response into MCP content format, and handles errors.
    export const getProjectDetailsTool = {
      name: "getProjectDetails",
      description: "Get detailed information about a specific project",
      // TODO: Add input/output schema validation if needed
      async execute(args: GetProjectDetailsInput): Promise<GetProjectDetailsMcpOutput> {
        console.error(`Executing getProjectDetails tool for project ID: ${args.project_id}...`);
    
        // Get API key from environment
        const apiKey = process.env.DEEPWRITER_API_KEY;
        if (!apiKey) {
          throw new Error("DEEPWRITER_API_KEY environment variable is required");
        }
        if (!args.project_id) {
          throw new Error("Missing required argument: project_id");
        }
    
        try {
          // Call the actual API client function
          const apiResponse = await apiClient.getProjectDetails(apiKey, args.project_id);
          console.error(`API call successful for getProjectDetails.`);
    
          // Transform the API response into MCP format
          const mcpResponse: GetProjectDetailsMcpOutput = {
            content: [
              { type: 'text', text: `Project ID: ${apiResponse.project.id}` },
              { type: 'text', text: `Title: ${apiResponse.project.title}` },
              { type: 'text', text: `Created At: ${apiResponse.project.created_at}` },
              { type: 'text', text: `Updated At: ${apiResponse.project.updated_at}` },
              // Include optional fields if they exist
              ...(apiResponse.project.author ? [{ type: 'text' as const, text: `Author: ${apiResponse.project.author}` }] : []),
              ...(apiResponse.project.model ? [{ type: 'text' as const, text: `Model: ${apiResponse.project.model}` }] : []),
              // Display prompt (might be large/complex)
              { type: 'text', text: `Prompt: ${JSON.stringify(apiResponse.project.prompt ?? 'N/A', null, 2)}` },
              // Add other relevant fields as needed
              ...(apiResponse.project.work_description ? [{ type: 'text' as const, text: `Work Description: ${apiResponse.project.work_description}` }] : []),
            ]
          };
    
          return mcpResponse; // Return the MCP-compliant structure
        } catch (error) {
          console.error(`Error executing getProjectDetails tool: ${error}`);
          // Format error for MCP response
          const errorMessage = error instanceof Error ? error.message : String(error);
          throw new Error(`Failed to get project details for ID ${args.project_id}: ${errorMessage}`);
        }
      }
    };
  • TypeScript interfaces defining the input parameters and MCP-compliant output structure for the getProjectDetails tool.
    // Define input/output types based on schema (API key from environment)
    interface GetProjectDetailsInput {
      project_id: string;
    }
    
    // Define the MCP-compliant output structure
    interface GetProjectDetailsMcpOutput {
      content: { type: 'text'; text: string }[];
    }
  • src/index.ts:211-231 (registration)
    Registration of the getProjectDetails tool with the MCP server using server.tool(), including inline Zod input schema and annotations.
    server.tool(
      getProjectDetailsTool.name,
      getProjectDetailsTool.description,
      {
        project_id: z.string().describe("The ID of the project to retrieve details for.")
      },
      async ({ project_id }: GetProjectDetailsParams) => {
        console.error(`SDK invoking ${getProjectDetailsTool.name}...`);
        const result = await getProjectDetailsTool.execute({ project_id });
        return {
          content: result.content,
          annotations: {
            title: "Get Project Details",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        };
      }
    );
  • Helper function in the API client that performs the actual HTTP GET request to retrieve project details from the DeepWriter API.
    export async function getProjectDetails(apiKey: string, projectId: string): Promise<GetProjectDetailsResponse> {
      console.error(`Calling actual getProjectDetails API for project ID: ${projectId}`);
      if (!apiKey) {
        throw new Error("API key is required for getProjectDetails");
      }
      if (!projectId) {
        throw new Error("Project ID is required for getProjectDetails");
      }
      const endpoint = `/api/getProjectDetails?projectId=${encodeURIComponent(projectId)}`;
      return makeApiRequest<GetProjectDetailsResponse>(endpoint, apiKey, 'GET');
    }
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. It states the action but lacks details on permissions, rate limits, error handling, or response format. For a read operation without annotations, this leaves significant gaps in understanding how the tool behaves.

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 is appropriately sized and front-loaded, making it easy to parse quickly.

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 of a read operation with no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, potential errors, or how results are structured, leaving the agent with insufficient context for effective use.

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 100%, so the input schema already documents both parameters ('api_key' for authentication and 'project_id' for identification). The description adds no additional meaning beyond what the schema provides, such as format examples or constraints, 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 verb 'Get' and the resource 'detailed information about a specific project', making the purpose evident. However, it doesn't distinguish this tool from sibling tools like 'listProjects' or 'updateProject' beyond the basic action, missing explicit differentiation.

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. It doesn't mention prerequisites, such as needing a project ID, or contrast it with 'listProjects' for overviews versus details. Without such context, usage is implied but not clarified.

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

Related 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/deepwriter-ai/Deepwriter-MCP'

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