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'],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves pages that reference a specific page, implying a read-only operation, but doesn't disclose any behavioral traits such as permissions needed, rate limits, pagination, or error handling. For a tool with no annotations, this is a significant gap, as it leaves key operational details unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence in Korean: '특정 페이지를 참조하는 모든 페이지 조회.' It is front-loaded with the core purpose and has no unnecessary words, making it highly efficient and easy to understand. Every part of the sentence earns its place by directly conveying the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of retrieving backlinks (which involves relationships between pages), the lack of annotations and output schema means the description is incomplete. It doesn't explain what the return values look like (e.g., list of pages, metadata), any limitations, or how to handle errors. For a tool with no structured output information, this leaves significant gaps in understanding its behavior and results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'path' parameter documented as '페이지 경로 또는 이름' (page path or name). The description doesn't add any meaning beyond this, such as format examples or constraints. Since the schema already provides adequate parameter information, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '특정 페이지를 참조하는 모든 페이지 조회' translates to 'Retrieve all pages that reference a specific page.' This specifies the verb (retrieve/reference) and resource (pages), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_graph' or 'search_pages,' which might have overlapping functionality, so it doesn't reach a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, exclusions, or comparisons with sibling tools such as 'get_graph' (which might show relationships) or 'search_pages' (which might find pages based on content). This lack of context leaves the agent to infer usage, resulting in a minimal score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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