Skip to main content
Glama

Backlog MCP Server

getDocument.ts999 B
import { Backlog } from 'backlog-js'; import { z } from 'zod'; import { TranslationHelper } from '../createTranslationHelper.js'; import { DocumentItemSchema } from '../types/zod/backlogOutputDefinition.js'; import { buildToolSchema, ToolDefinition } from '../types/tool.js'; const getDocumentSchema = buildToolSchema((t) => ({ documentId: z .string() .describe(t('TOOL_GET_DOCUMENT_DOCUMENT_ID', 'Document ID')), })); export const getDocumentTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getDocumentSchema>, (typeof DocumentItemSchema)['shape'] > => { return { name: 'get_document', description: t( 'TOOL_GET_DOCUMENT_DESCRIPTION', 'Gets information about a document.' ), schema: z.object(getDocumentSchema(t)), outputSchema: DocumentItemSchema, importantFields: ['id', 'title', 'createdUser'], handler: async ({ documentId }) => { return backlog.getDocument(documentId); }, }; };

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