Skip to main content
Glama

write_vault

Save a new item to the Loci knowledge vault with built-in duplicate detection: checks existing titles or source URLs and returns tag warnings to fix conflicts.

Instructions

Write a new item to the Loci vault. Returns {uid, path, type, title}, plus tag_warnings when a tag names a project/entity/topic (belongs as a relation) or repeats the node's own type or subtype. The write has already happened; surface the warning and offer the fix.

Checks for duplicates itself: if a node with the same title or the same extra_fields.source_url already exists, nothing is written and the result is {duplicate: true, uid, path, name, message} describing the existing node. Ask the user whether to update that node (patch_vault) or save a new one anyway, and in the latter case call again with allow_duplicate=true.

Args: type: document | article | bookmark | conversation | project | task | event | entity | procedure | skill | topic | asset | log title: Concise descriptive title body: Main content body (markdown) tags: 3-6 freeform lowercase hyphenated tags domains: One or more from: technology-engineering, science-research, business-strategy, finance-economics, health-biology, philosophy-ethics, creativity-design, personal-development, current-events-society summary: One-paragraph summary — what this is, why it matters, key insight author: "self" for user-produced content; entity name/UID for external relations: List of {uid: str, type: str} dicts references: List of {url: str, title: str, source_type: str} dicts extra_fields: Type-specific frontmatter fields. Do NOT put the body here — 'body' is not a frontmatter field. A 'body' key in extra_fields is rerouted to the body argument and a warning is returned. A 'uid' key (from generate_uid) is honoured and reported back; one another node already holds is refused with {errors: [...]}. Omit it to have one generated. allow_duplicate: Write even though a similar node exists. Only after the user has chosen "save as new".

Input Schema

NameRequiredDescriptionDefault
bodyYes
tagsNo
typeYes
titleYes
authorNoself
domainsNo
summaryNo
relationsNo
referencesNo
extra_fieldsNo
allow_duplicateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it discloses that duplicates cause nothing to be written and returns a {duplicate: true, ...} shape, that tag_warnings are advisory rather than blocking, that a body key in extra_fields is rerouted, and that a conflicting uid is refused with {errors}. The only notable omission is irreversibility/undo (undo_last_vault_change exists but is not mentioned).

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?

Long but organized: behavior and return shape first, then the duplicate workflow, then an arg-by-arg list. The prose is mostly load-bearing, though a few lines (e.g., the repeated emphasis on tag_warnings being advisory and 'The write has already happened') could be tightened.

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 an 11-parameter mutation tool with no output schema and no annotations, the description supplies both return shapes (success and duplicate), the error case, and full argument semantics. An agent has everything needed to call it correctly and handle both outcomes.

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

Parameters5/5

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

Schema description coverage is 0% and the schema has no enums, so the description must compensate — and it does: it enumerates all valid type values, all domain values, tags conventions ('3-6 freeform lowercase hyphenated'), author conventions, and the shape of relations/references dicts. It also explains the non-obvious extra_fields/body/uid interactions. This is meaning the schema alone cannot supply.

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?

Opens with a specific verb+resource: 'Write a new item to the Loci vault.' It also makes the read/write boundary explicit versus patch_vault for updates. It does not distinguish itself from write_skill, save_asset, or write_meta, so a sibling ambiguity remains for a few edge cases.

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?

Gives explicit when-to-use routing: on duplicate, ask the user whether to update via patch_vault or re-call with allow_duplicate=true, and gates allow_duplicate to only after the user picks 'save as new'. It also tells the agent what to do with tag_warnings (surface and offer the fix). This is a full when/when-not/alternatives treatment.

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