Skip to main content
Glama
debugg-ai

Debugg AI MCP

Official
by debugg-ai

Update Project

update_project

Update an existing project's name or description using its UUID. Returns the updated project details or an error if the project is not found.

Instructions

Patch a project by UUID. Optional fields: name, description. Returns {updated:true, project:{...simplified resource}}. Returns isError:true + NotFound when uuid doesn't exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the project. Required.
nameNoOptional: new name.
descriptionNoOptional: new description.

Implementation Reference

  • Main handler function for the update_project tool. Takes UpdateProjectInput, initializes DebuggAI client, calls updateProject API, and returns updated project or NotFound response.
    export async function updateProjectHandler(
      input: UpdateProjectInput,
      _context: ToolContext,
    ): Promise<ToolResponse> {
      const start = Date.now();
      logger.toolStart('update_project', {
        uuid: input.uuid,
        patchKeys: Object.keys(input).filter(k => k !== 'uuid'),
      });
    
      try {
        const client = new DebuggAIServerClient(config.api.key);
        await client.init();
    
        try {
          const project = await client.updateProject(input.uuid, {
            name: input.name,
            description: input.description,
          });
          logger.toolComplete('update_project', Date.now() - start);
          return {
            content: [{ type: 'text', text: JSON.stringify({ updated: true, project }, null, 2) }],
          };
        } catch (err: any) {
          if (err?.statusCode === 404 || err?.response?.status === 404) return notFound(input.uuid);
          throw err;
        }
      } catch (error) {
        logger.toolError('update_project', error as Error, Date.now() - start);
        throw handleExternalServiceError(error, 'DebuggAI', 'update_project');
      }
    }
  • Zod schema and TypeScript type for update_project input validation: uuid (required), name and description (optional).
    export const UpdateProjectInputSchema = z.object({
      uuid: z.string().uuid(),
      name: z.string().min(1).optional(),
      description: z.string().optional(),
    }).strict();
    export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
  • Builds the Tool definition (name: 'update_project') and the ValidatedTool wrapper that ties the schema to the handler.
    export function buildUpdateProjectTool(): Tool {
      return {
        name: 'update_project',
        title: 'Update Project',
        description: DESCRIPTION,
        inputSchema: {
          type: 'object',
          properties: {
            uuid: { type: 'string', description: 'UUID of the project. Required.' },
            name: { type: 'string', description: 'Optional: new name.', minLength: 1 },
            description: { type: 'string', description: 'Optional: new description.' },
          },
          required: ['uuid'],
          additionalProperties: false,
        },
      };
    }
    
    export function buildValidatedUpdateProjectTool(): ValidatedTool {
      const tool = buildUpdateProjectTool();
      return { ...tool, inputSchema: UpdateProjectInputSchema, handler: updateProjectHandler };
    }
  • tools/index.ts:44-66 (registration)
    Registration of update_project in the tools list (unvalidated at line 44, validated at line 66).
      buildUpdateProjectTool(),
      buildDeleteProjectTool(),
      buildSearchExecutionsTool(),
      buildCreateProjectTool(),
      buildCreateTestSuiteTool(),
      buildSearchTestSuitesTool(),
      buildDeleteTestSuiteTool(),
      buildCreateTestCaseTool(),
      buildUpdateTestCaseTool(),
      buildDeleteTestCaseTool(),
      buildRunTestSuiteTool(),
      buildGetTestSuiteResultsTool(),
    ];
    const validated: ValidatedTool[] = [
      buildValidatedTestPageChangesTool(ctx),
      buildValidatedTriggerCrawlTool(ctx),
      buildValidatedProbePageTool(),
      buildValidatedSearchProjectsTool(),
      buildValidatedSearchEnvironmentsTool(),
      buildValidatedCreateEnvironmentTool(),
      buildValidatedUpdateEnvironmentTool(),
      buildValidatedDeleteEnvironmentTool(),
      buildValidatedUpdateProjectTool(),
  • Service-layer method that PATCHes the project via API (DebuggAIServerClient.updateProject).
    public async updateProject(uuid: string, patch: { name?: string; description?: string }) {
      if (!this.tx) throw new Error('Client not initialized — call init() first');
      const body: Record<string, any> = {};
      if (patch.name !== undefined) body.name = patch.name;
      if (patch.description !== undefined) body.description = patch.description;
      const p = await this.tx.patch<any>(`api/v1/projects/${uuid}/`, body);
      return this.mapProjectDetail(p);
    }
Behavior4/5

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

With no annotations, the description discloses the mutation operation, success return shape, and error condition on NotFound. It lacks idempotency or concurrency details but is sufficient for a simple update.

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?

Two concise sentences: first states purpose, second covers return and error. No unnecessary words, well front-loaded.

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

Completeness4/5

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

Given the tool's simplicity (3 params, no output schema), the description adequately covers the return format and error. Could mention partial update behavior explicitly, but it's implied.

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 coverage is 100%, so baseline is 3. Description adds minimal extra by clarifying uuid as selector and that fields are optional, but largely repeats schema info.

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 specifies the verb 'Patch' (partial update) and the resource 'project by UUID'. It distinguishes from siblings like create_project and delete_project.

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?

It states the tool is for updating a project's optional fields (name, description) and describes the error behavior when UUID is not found. While it does not explicitly compare to siblings, the context is clear.

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/debugg-ai/debugg-ai-mcp'

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