Skip to main content
Glama

get_backlinks

Retrieve all pages that reference a specific page in your Logseq knowledge graph to analyze connections and relationships.

Instructions

특정 페이지를 참조하는 모든 페이지 조회

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes페이지 경로 또는 이름

Implementation Reference

  • Core implementation of getBacklinks: reads the target page to get its name, lists all pages, and filters those that have a link to the target page name.
    async getBacklinks(pathOrName: string): Promise<PageMetadata[]> { const page = await this.readPage(pathOrName); const allPages = await this.listPages(); return allPages.filter(p => p.links.includes(page.name)); }
  • MCP server tool handler: parses input arguments using schema and delegates to GraphService.getBacklinks, formats response as JSON.
    case 'get_backlinks': { const { path } = GetBacklinksSchema.parse(args); const backlinks = await graph.getBacklinks(path); return { content: [{ type: 'text', text: JSON.stringify(backlinks, null, 2) }], }; }
  • Zod schema for validating the 'path' input parameter of the get_backlinks tool.
    const GetBacklinksSchema = z.object({ path: z.string().max(MAX_PATH_LENGTH).describe('페이지 경로 또는 이름'), });
  • src/index.ts:194-204 (registration)
    Tool registration metadata: defines name, description, and input schema for the MCP tools list.
    { name: 'get_backlinks', description: '특정 페이지를 참조하는 모든 페이지 조회', inputSchema: { type: 'object' as const, properties: { path: { type: 'string', description: '페이지 경로 또는 이름' }, }, required: ['path'], }, },

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/dearcloud09/logseq-mcp'

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