Skip to main content
Glama

lore_sync

Reconcile manual Markdown edits in world, characters, and chapters with the published canon. Inspect changes, validate impact, then apply an approved sync before drafting.

Instructions

Published HEAD 이후 사람이 world/·characters/·chapters/에서 직접 고친 Markdown을 정본에 반영한다. lore_status나 lore_write가 working-tree drift(needs_sync)를 보고하면 집필 전에 이 도구를 쓴다. 공백만 바뀐 편집은 무시한다. 3단계 승인 흐름: inspect(기본)는 변경을 분류만 한다(기준 지문 갱신 외 쓰기 없음). validate는 마지막 화 손수정이면 재검사(모델 작업→needs_model→lore_resume), 세계·인물 변경이면 바뀐 항목과 영향받는 계획을 보여 주고 approvalId를 발급한다. apply는 그 approvalId로 새 정본을 게시한다. approvalId는 한 번만 쓸 수 있고 validate 이후 파일이 또 바뀌면 STALE_SYNC_CANDIDATE로 거부된다. 이전 화 손수정은 반영하지 않으므로(rewrite_refold_required) 되돌려야 한다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoinspect(기본)=변경 분류, validate=재검사·영향 검토 후 approvalId 발급, apply=approvalId로 게시
workIdYes작품 식별자 ([A-Za-z0-9_-]). 한 디렉터리에는 작품 하나만 둔다.
projectNo작품 디렉터리의 절대 경로. 생략하면 서버 실행 디렉터리.
approvalIdNoapply 전용. 가장 최근 validate가 돌려준 approvalId(sync-…). 한 번 쓰면 소진된다.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.4
    • addedInput schema / properties / action / description
      Added value: +"inspect(기본)=변경 분류, validate=재검사·영향 검토 후 approvalId 발급, apply=approvalId로 게시"
    • addedInput schema / properties / approvalId / description
      Added value: +"apply 전용. 가장 최근 validate가 돌려준 approvalId(sync-…). 한 번 쓰면 소진된다."
    • changedInput schema / properties / workId / description
      Previous value: -"작품 식별자 ([A-Za-z0-9_-])."New value: +"작품 식별자 ([A-Za-z0-9_-]). 한 디렉터리에는 작품 하나만 둔다."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only state readOnlyHint=false, idempotentHint=false, destructiveHint=false. The description goes well beyond: inspect writes nothing except the baseline fingerprint, approvalId is single-use, a post-validate file change yields STALE_SYNC_CANDIDATE, and whitespace-only edits are ignored. This is exactly the mutation-safety context annotations cannot express.

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

Conciseness4/5

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

Dense and front-loaded: purpose first, then trigger, then the three-stage flow with failure modes. Every sentence carries information, though the approval-flow paragraph is packed tightly enough to require a careful second read.

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

Completeness5/5

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

For a multi-stage, stateful mutation tool with no output schema and no idempotency guarantee, the description supplies the full lifecycle: prerequisites, stage semantics, approval token lifetime, and rejection conditions. An agent can drive the workflow end-to-end from this text alone.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains what each action stage does behaviorally (inspect classifies only, validate issues approvalId, apply consumes it) and why approvalId expires. Only project path handling is left entirely to the schema.

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

Purpose5/5

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

The first sentence states a specific verb+resource: it reflects human-edited Markdown in world/·characters/·chapters/ into the canon after published HEAD. That scope is distinct from siblings like lore_write and lore_status, which the description explicitly positions itself against.

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

Usage Guidelines5/5

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

It gives an explicit trigger (use when lore_status or lore_write reports working-tree drift/needs_sync, before writing) and an explicit exclusion (prior-chapter manual edits are not reflected; they must be reverted via rewrite_refold_required). The alternative routing to lore_resume on needs_model is also named.

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