Skip to main content
Glama

get_document_backlinks

Find documents that link 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

  • Core implementation of the get_document_backlinks tool handler. Fetches document details from the Outline API and returns formatted backlinks.
    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 definition for the input parameters of the get_document_backlinks tool (requires 'documentId').
    export const getDocumentBacklinksSchema = z.object({ documentId });
  • Registers the get_document_backlinks tool in the allTools array, providing name, description, and schema for MCP protocol.
    createTool( 'get_document_backlinks', 'Find other documents linking to this document.', 'get_document_backlinks' ),
  • Combines all handler factories, including createCommentHandlers which provides the get_document_backlinks function, into a single ToolHandlers object.
    return { ...createSearchHandlers(ctx), ...createDocumentHandlers(ctx), ...createCollectionHandlers(ctx), ...createCommentHandlers(ctx), ...createBatchHandlers(ctx), ...createSmartHandlers(ctx), } as ToolHandlers; }
  • Associates the tool name 'get_document_backlinks' with its Zod schema in the central toolSchemas mapping.
    get_document_backlinks: getDocumentBacklinksSchema,

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