Skip to main content
Glama

Backlog MCP Server

deleteIssue.ts1.32 kB
import { z } from 'zod'; import { Backlog } from 'backlog-js'; import { buildToolSchema, ToolDefinition } from '../types/tool.js'; import { TranslationHelper } from '../createTranslationHelper.js'; import { IssueSchema } from '../types/zod/backlogOutputDefinition.js'; import { resolveIdOrKey } from '../utils/resolveIdOrKey.js'; const deleteIssueSchema = buildToolSchema((t) => ({ issueId: z .number() .optional() .describe( t( 'TOOL_DELETE_ISSUE_ISSUE_ID', 'The numeric ID of the issue (e.g., 12345)' ) ), issueKey: z .string() .optional() .describe( t('TOOL_GET_ISSUE_ISSUE_KEY', "The key of the issue (e.g., 'PROJ-123')") ), })); export const deleteIssueTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof deleteIssueSchema>, (typeof IssueSchema)['shape'] > => { return { name: 'delete_issue', description: t('TOOL_DELETE_ISSUE_DESCRIPTION', 'Deletes an issue'), schema: z.object(deleteIssueSchema(t)), outputSchema: IssueSchema, handler: async ({ issueId, issueKey }) => { const result = resolveIdOrKey('issue', { id: issueId, key: issueKey }, t); if (!result.ok) { throw result.error; } return backlog.deleteIssue(result.value); }, }; };

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/nulab/backlog-mcp-server'

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