Skip to main content
Glama

get_document_backlinks

Find documents linking to a specific Outline wiki document to understand content relationships and references.

Instructions

Find other documents linking to this document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes

Implementation Reference

  • The main execution logic for the get_document_backlinks tool. Fetches document details from Outline API using /documents.info endpoint and formats the backlinks using formatBacklinks helper.
    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), }; },
  • Zod schema defining the input for the tool: requires a documentId string.
    export const getDocumentBacklinksSchema = z.object({ documentId });
  • Registers the tool in the allTools array for MCP with name, description, and schema reference.
    createTool( 'get_document_backlinks', 'Find other documents linking to this document.', 'get_document_backlinks' ),
  • Maps the tool name to its Zod schema in the central toolSchemas object used by tool definitions.
    get_document_backlinks: getDocumentBacklinksSchema,
  • Includes the comment handlers (containing get_document_backlinks) in the combined createAllHandlers for tool handler registration.
    ...createCommentHandlers(ctx),

Latest Blog Posts

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/huiseo/outline-smart-mcp'

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