get_wiki_pages
Retrieve wiki pages from Backlog projects using project ID, key, or keyword search to access documentation and knowledge resources.
Instructions
Returns list of Wiki pages
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') | |
| keyword | No | Keyword to search for in Wiki pages |
Implementation Reference
- src/tools/getWikiPages.ts:51-64 (handler)The handler function that executes the 'get_wiki_pages' tool logic: resolves project ID or key, then calls backlog.getWikis with project and optional keyword.handler: async ({ projectId, projectKey, keyword }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.getWikis({ projectIdOrKey: result.value, keyword, }); },
- src/tools/getWikiPages.ts:8-33 (schema)Zod schema definition for the input parameters of the 'get_wiki_pages' tool: optional projectId, projectKey, and keyword.const getWikiPagesSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_GET_WIKI_PAGES_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_GET_WIKI_PAGES_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), keyword: z .string() .optional() .describe( t('TOOL_GET_WIKI_PAGES_KEYWORD', 'Keyword to search for in Wiki pages') ), }));
- src/tools/tools.ts:119-129 (registration)Registration of the 'get_wiki_pages' tool within the 'wiki' toolset group in the allTools export.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/tools/getWikiPages.ts:48-50 (schema)Tool schema instantiation and output schema (WikiListItemSchema) definition.schema: z.object(getWikiPagesSchema(t)), outputSchema: WikiListItemSchema, importantFields: ['projectId', 'name', 'tags'],
- src/tools/getWikiPages.ts:35-66 (handler)Full tool definition export including name, description, schemas, and handler for 'get_wiki_pages'.export const getWikiPagesTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getWikiPagesSchema>, (typeof WikiListItemSchema)['shape'] > => { return { name: 'get_wiki_pages', description: t( 'TOOL_GET_WIKI_PAGES_DESCRIPTION', 'Returns list of Wiki pages' ), schema: z.object(getWikiPagesSchema(t)), outputSchema: WikiListItemSchema, importantFields: ['projectId', 'name', 'tags'], handler: async ({ projectId, projectKey, keyword }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.getWikis({ projectIdOrKey: result.value, keyword, }); }, }; };