Skip to main content
Glama

read_page

Retrieve the full content and metadata of a specific page in your Logseq knowledge graph to access information directly.

Instructions

특정 페이지의 전체 내용과 메타데이터 조회

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes페이지 경로 또는 이름 (예: "pages/note" 또는 "note")

Implementation Reference

  • MCP tool call handler: parses arguments using schema and delegates to GraphService.readPage, returns JSON serialized page
    case 'read_page': {
      const { path } = ReadPageSchema.parse(args);
      const page = await graph.readPage(path);
      return {
        content: [{ type: 'text', text: JSON.stringify(page, null, 2) }],
      };
    }
  • Zod input validation schema for read_page tool
    const ReadPageSchema = z.object({
      path: z.string().max(MAX_PATH_LENGTH).describe('페이지 경로 또는 이름 (예: "pages/note" 또는 "note")'),
    });
  • src/index.ts:122-131 (registration)
    Tool registration entry in TOOLS array defining name, description, and JSON input schema
      name: 'read_page',
      description: '특정 페이지의 전체 내용과 메타데이터 조회',
      inputSchema: {
        type: 'object' as const,
        properties: {
          path: { type: 'string', description: '페이지 경로 또는 이름 (예: "pages/note" 또는 "note")' },
        },
        required: ['path'],
      },
    },
  • GraphService.readPage: resolves file path, reads and parses content, extracts tags/links/backlinks/properties, returns Page object
    async readPage(pathOrName: string): Promise<Page> {
      const filePath = await this.resolvePath(pathOrName);
      await this.checkSymlink(filePath); // 심링크 공격 방지
      const content = await readFile(filePath, 'utf-8');
      const name = basename(filePath, '.md');
      const isJournal = filePath.includes('/journals/');
    
      const { properties, body } = this.parseProperties(content);
      const stats = await stat(filePath);
    
      // Get backlinks
      const allPages = await this.collectAllPages();
      const backlinks = allPages
        .filter(p => p.links.includes(name))
        .map(p => p.name);
    
      return {
        path: filePath.replace(this.graphPath + '/', ''),
        name,
        content: body,
        properties,
        tags: this.extractTags(content),
        links: this.extractLinks(content),
        backlinks,
        isJournal,
        createdAt: stats.birthtime,
        modifiedAt: stats.mtime,
      };
    }
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. While '조회' (retrieve/read) implies a read-only operation, it doesn't explicitly state safety aspects like whether it requires authentication, has rate limits, or what happens if the page doesn't exist. For a read tool with zero annotation coverage, this leaves significant gaps in understanding its behavior beyond the basic action.

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, efficient sentence in Korean that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, with every word contributing to understanding the action. This exemplifies conciseness, earning a top score.

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 tool's complexity (a read operation with one parameter) and the lack of annotations and output schema, the description is incomplete. It doesn't cover what the return values include (e.g., format of content/metadata), error conditions, or behavioral traits like idempotency. For a tool in a server with multiple siblings, more context is needed to ensure the agent can use it effectively.

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 well-documented in the schema itself. The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter usage, constraints, or examples. According to the rules, with high schema coverage (>80%), the baseline is 3 even without param info in the description.

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 as retrieving both content and metadata for a specific page ('특정 페이지의 전체 내용과 메타데이터 조회'), which translates to 'Retrieve the full content and metadata of a specific page.' This is a specific verb+resource combination that distinguishes it from siblings like list_pages (listing) or search_pages (searching). However, it doesn't explicitly differentiate from get_journal or get_backlinks, which might also retrieve content, so it's not a perfect 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 prerequisites, such as needing an existing page, or compare it to siblings like get_journal (which might retrieve journal-specific content) or update_page (which modifies content). Without any context on usage scenarios or exclusions, the agent must infer from the name and description alone.

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