get_document_backlinks
Find documents linking to a specific Outline wiki document to understand connections and references within your knowledge base.
Instructions
Find other documents linking to this document.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes |
Implementation Reference
- src/lib/handlers/comments.ts:69-77 (handler)The handler function that implements the core logic of the get_document_backlinks tool. It fetches the document information using the Outline API and formats the backlinks for return.async get_document_backlinks(args: GetDocumentBacklinksInput) { const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.info', { id: args.documentId }) ); return { documentId: args.documentId, backlinks: formatBacklinks(data.backlinks || [], baseUrl), }; },
- src/lib/schemas.ts:68-68 (schema)Zod schema defining the input for the tool, requiring a documentId string.export const getDocumentBacklinksSchema = z.object({ documentId });
- src/lib/tools.ts:140-142 (registration)Registers the tool in the allTools array, specifying its name, description, and linking to the schema for MCP tool definition.'get_document_backlinks', 'Find other documents linking to this document.', 'get_document_backlinks'
- src/lib/schemas.ts:232-232 (schema)Maps the tool name to its schema in the toolSchemas object used by tool definitions.get_document_backlinks: getDocumentBacklinksSchema,