Skip to main content
Glama
debugg-ai

Debugg AI MCP

Official
by debugg-ai

Update Project

update_project

Update a project using its UUID. Optionally set a new name or description. Returns updated project data. Returns error if UUID does not exist.

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. Receives UpdateProjectInput, calls client.updateProject(), and returns {updated:true, project} on success or a 404 error 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 UpdateProjectInput: uuid (required), name (optional, min 1), 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 object with name 'update_project', description, and inputSchema (JSON Schema). Also exports buildValidatedUpdateProjectTool which pairs the schema with 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:24-58 (registration)
    Tool registry initialization: tools array includes buildUpdateProjectTool(), validated array includes buildValidatedUpdateProjectTool(), both registered in initTools().
    export function initTools(ctx: ProjectContext | null): void {
      const tools: Tool[] = [
        buildTestPageChangesTool(ctx),
        buildTriggerCrawlTool(ctx),
        buildProbePageTool(),
        buildSearchProjectsTool(),
        buildSearchEnvironmentsTool(),
        buildCreateEnvironmentTool(),
        buildUpdateEnvironmentTool(),
        buildDeleteEnvironmentTool(),
        buildUpdateProjectTool(),
        buildDeleteProjectTool(),
        buildSearchExecutionsTool(),
        buildCreateProjectTool(),
      ];
      const validated: ValidatedTool[] = [
        buildValidatedTestPageChangesTool(ctx),
        buildValidatedTriggerCrawlTool(ctx),
        buildValidatedProbePageTool(),
        buildValidatedSearchProjectsTool(),
        buildValidatedSearchEnvironmentsTool(),
        buildValidatedCreateEnvironmentTool(),
        buildValidatedUpdateEnvironmentTool(),
        buildValidatedDeleteEnvironmentTool(),
        buildValidatedUpdateProjectTool(),
        buildValidatedDeleteProjectTool(),
        buildValidatedSearchExecutionsTool(),
        buildValidatedCreateProjectTool(),
      ];
    
      _tools = tools;
      _validatedTools = validated;
    
      toolRegistry.clear();
      for (const v of validated) toolRegistry.set(v.name, v);
  • Service-level updateProject method that PATCHes to api/v1/projects/{uuid}/ with name/description fields.
    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 provided, the description carries full burden. It describes the HTTP method (patch), return format with 'updated:true' and project object, and error case 'NotFound'. It does not detail side effects or permissions, but the behavior is sufficiently clear 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 that front-load the key purpose and immediately specify optional fields. Every sentence adds value without fluff.

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, full schema coverage, no output schema), the description covers purpose, parameters, return format, and error cases. It could elaborate on the 'simplified resource' but is sufficient for correct invocation.

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%, baseline 3. The description mentions 'Optional fields: name, description' but does not add new meaning beyond the schema's own descriptions for these parameters and the uuid.

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 uses specific verb 'Patch' and resource 'project by UUID', listing optional fields 'name, description'. This clearly distinguishes from sibling tools like create_project, delete_project, and others.

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 usage for updating an existing project via UUID and indicates optional fields. It mentions the error case for non-existent UUID but does not explicitly state when to use this tool over others, though 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