update_project
Modify existing project details in Backlog, including name, settings, and status, to maintain accurate project management records.
Instructions
Updates an existing project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | The numeric ID of the project (e.g., 12345) | |
| projectKey | No | The key of the project (e.g., 'PROJECT') | |
| name | No | Project name | |
| key | No | Project key | |
| chartEnabled | No | Whether to enable chart | |
| subtaskingEnabled | No | Whether to enable subtasking | |
| projectLeaderCanEditProjectLeader | No | Whether project leaders can edit other project leaders | |
| textFormattingRule | No | Text formatting rule | |
| archived | No | Whether to archive the project |
Implementation Reference
- src/tools/updateProject.ts:86-96 (handler)The asynchronous handler function for the 'update_project' tool. It resolves the project ID or key using resolveIdOrKey and calls backlog.patchProject with the resolved project ID and update parameters.handler: async ({ projectId, projectKey, ...param }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.patchProject(result.value, param); },
- src/tools/updateProject.ts:8-69 (schema)Zod schema definition for the input parameters of the 'update_project' tool, including optional projectId, projectKey, name, key, and various project settings.const updateProjectSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_UPDATE_PROJECT_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_UPDATE_PROJECT_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), name: z .string() .optional() .describe(t('TOOL_UPDATE_PROJECT_NAME', 'Project name')), key: z .string() .optional() .describe(t('TOOL_UPDATE_PROJECT_KEY', 'Project key')), chartEnabled: z .boolean() .optional() .describe( t('TOOL_UPDATE_PROJECT_CHART_ENABLED', 'Whether to enable chart') ), subtaskingEnabled: z .boolean() .optional() .describe( t( 'TOOL_UPDATE_PROJECT_SUBTASKING_ENABLED', 'Whether to enable subtasking' ) ), projectLeaderCanEditProjectLeader: z .boolean() .optional() .describe( t( 'TOOL_UPDATE_PROJECT_LEADER_CAN_EDIT', 'Whether project leaders can edit other project leaders' ) ), textFormattingRule: z .enum(['backlog', 'markdown']) .optional() .describe(t('TOOL_UPDATE_PROJECT_TEXT_FORMATTING', 'Text formatting rule')), archived: z .boolean() .optional() .describe( t('TOOL_UPDATE_PROJECT_ARCHIVED', 'Whether to archive the project') ), }));
- src/tools/tools.ts:84-84 (registration)The 'updateProjectTool' is invoked and registered within the 'project' toolset group in the allTools function.updateProjectTool(backlog, helper),
- src/tools/tools.ts:47-47 (registration)Import statement for the updateProjectTool from its implementation file.import { updateProjectTool } from './updateProject.js';
- src/tools/updateProject.ts:71-98 (handler)The full tool definition function that creates and exports the 'update_project' tool, including name, description, schema, output schema, and handler.export const updateProjectTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof updateProjectSchema>, (typeof ProjectSchema)['shape'] > => { return { name: 'update_project', description: t( 'TOOL_UPDATE_PROJECT_DESCRIPTION', 'Updates an existing project' ), schema: z.object(updateProjectSchema(t)), outputSchema: ProjectSchema, handler: async ({ projectId, projectKey, ...param }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.patchProject(result.value, param); }, }; };