get_wiki
Retrieve detailed information about a specific wiki page using its ID. Optionally specify an organization to scope the query.
Instructions
Returns information about a specific wiki page
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wikiId | Yes | Wiki ID | |
| organization | No | Optional organization name. Use list_organizations to inspect available organizations. |
Implementation Reference
- src/tools/getWiki.ts:13-35 (handler)The main handler function for the 'get_wiki' tool. It defines the tool name, description, input schema (wikiId), output schema (WikiSchema), and the handler that converts wikiId to a number and calls backlog.getWiki().
export const getWikiTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getWikiSchema>, (typeof WikiSchema)['shape'] > => { return { name: 'get_wiki', description: t( 'TOOL_GET_WIKI_DESCRIPTION', 'Returns information about a specific wiki page' ), schema: z.object(getWikiSchema(t)), outputSchema: WikiSchema, importantFields: ['id', 'projectId', 'name', 'content'], handler: async ({ wikiId }) => { const wikiIdNumber = typeof wikiId === 'string' ? parseInt(wikiId, 10) : wikiId; return backlog.getWiki(wikiIdNumber); }, }; }; - src/tools/getWiki.ts:7-11 (schema)Input schema for the 'get_wiki' tool, defining a required 'wikiId' parameter that accepts either a string or a number.
const getWikiSchema = buildToolSchema((t) => ({ wikiId: z .union([z.string(), z.number()]) .describe(t('TOOL_GET_WIKI_ID', 'Wiki ID')), })); - Output schema (WikiSchema) for the wiki object returned by get_wiki, containing fields like id, projectId, name, content, tags, attachments, etc.
export const WikiSchema = z.object({ id: z.number(), projectId: z.number(), name: z.string(), content: z.string(), tags: z.array(TagSchema), attachments: z.array(WikiFileInfoSchema), sharedFiles: z.array(SharedFileSchema), stars: z.array(StarSchema), createdUser: UserSchema, created: z.string(), updatedUser: UserSchema, updated: z.string(), }); - src/tools/tools.ts:125-136 (registration)Registration of get_wiki in the 'wiki' toolset group within the allTools registry, alongside other wiki tools.
{ name: 'wiki', description: 'Tools for managing wiki pages.', enabled: false, tools: [ getWikiPagesTool(backlog, helper), getWikisCountTool(backlog, helper), getWikiTool(backlog, helper), addWikiTool(backlog, helper), updateWikiTool(backlog, helper), ], }, - src/types/tool.ts:24-26 (helper)The buildToolSchema helper used by get_wiki to create its input schema definition.
export const buildToolSchema = <T extends z.ZodRawShape>( fn: (t: TranslationHelper['t']) => T ) => fn;