Skip to main content
Glama

append_to_page

Add content to the end of existing Logseq pages to extend notes and maintain knowledge graphs without manual editing.

Instructions

기존 페이지 끝에 내용 추가

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes페이지 경로 또는 이름
contentYes추가할 내용

Implementation Reference

  • Core handler that performs the append operation: validates input content size, resolves the target file path safely, reads existing content, appends the new content with a newline separator, re-validates the combined content size, writes the updated content back to the file, and returns the full updated page metadata.
    async appendToPage(pathOrName: string, content: string): Promise<Page> {
      // 보안 검증: 추가할 콘텐츠 크기 제한 (DoS 방지)
      this.validateContentSize(content);
    
      const filePath = await this.resolvePath(pathOrName);
      await this.checkSymlink(filePath); // 심링크 공격 방지
      const existing = await readFile(filePath, 'utf-8');
      const newContent = existing.trimEnd() + '\n' + content;
    
      // 결합된 콘텐츠도 크기 검증
      this.validateContentSize(newContent);
    
      await writeFile(filePath, newContent, 'utf-8');
      return this.readPage(pathOrName);
    }
  • MCP tool dispatch handler: parses tool arguments using Zod schema, calls the GraphService appendToPage method, and returns the result as JSON-formatted text content.
    case 'append_to_page': {
      const { path, content } = AppendToPageSchema.parse(args);
      const page = await graph.appendToPage(path, content);
      return {
        content: [{ type: 'text', text: JSON.stringify(page, null, 2) }],
      };
    }
  • src/index.ts:169-180 (registration)
    Tool registration entry in the TOOLS array, defining the tool name, description, and JSON input schema for MCP list_tools.
    {
      name: 'append_to_page',
      description: '기존 페이지 끝에 내용 추가',
      inputSchema: {
        type: 'object' as const,
        properties: {
          path: { type: 'string', description: '페이지 경로 또는 이름' },
          content: { type: 'string', description: '추가할 내용' },
        },
        required: ['path', 'content'],
      },
    },
  • Zod runtime validation schema for append_to_page tool inputs, enforcing path and content length limits.
    const AppendToPageSchema = z.object({
      path: z.string().max(MAX_PATH_LENGTH).describe('페이지 경로 또는 이름'),
      content: z.string().max(MAX_CONTENT_LENGTH).describe('추가할 내용'),
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool appends content to the end of an existing page, implying a mutation operation, but lacks details on permissions, side effects (e.g., overwriting), rate limits, or response format. The description is minimal and doesn't disclose key behavioral traits 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 function without unnecessary words. It's appropriately sized and front-loaded, with zero waste. Every part of the sentence earns its place by conveying the core action.

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 has 2 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral context (e.g., error handling, permissions), usage guidelines relative to siblings, and output details. For a mutation tool with minimal structured data, the description should provide more completeness.

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?

Schema description coverage is 100%, with both parameters ('path' and 'content') documented in the schema. The description doesn't add any meaning beyond what the schema provides (e.g., no examples or constraints). Baseline is 3 since the schema does the heavy lifting, but no extra value is added.

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 action (append) and target (existing page), specifying it adds content to the end. It distinguishes from siblings like 'create_page' (new page) and 'update_page' (modify existing content), though it doesn't explicitly name alternatives. The purpose is specific but lacks explicit sibling differentiation.

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 like 'update_page' or 'create_page'. It implies usage for appending to existing pages but doesn't specify prerequisites (e.g., page must exist), exclusions, or contextual triggers. No explicit when/when-not statements are present.

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