Skip to main content
Glama

enrich_neighbor_keywords_tool

Enrich note frontmatter with neighbor keywords and cluster topics by computing embedding similarity and extracting frequent words from similar notes. Operates locally without API calls.

Instructions

Enrich notes with neighbor_keywords and cluster_topic derived from embedding similarity.

Computes cosine similarity between all notes' embeddings, finds top-5 neighbors per note, and writes high-frequency words from neighbors back into each note's frontmatter. No API or model calls — pure local computation from vault.db embeddings.

Args: note_path: Relative path to a single note (e.g. "10-projects/foo.md"). Empty string = process all notes without neighbor_keywords. force: If True, overwrite existing neighbor_keywords. Default: skip existing. Returns: JSON-like string with {"enriched": N, "skipped": M, "no_neighbors": K}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
note_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so well: it discloses the exact computation method, top-5 neighbor selection, frontmatter write behavior, force-overwrite semantics, and that no API or model calls are made. This gives an agent a clear picture of side effects and local-only execution.

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 front-loaded with the purpose and mechanism, then structured into clear Args and Returns sections. Every sentence adds operational value, and there is no redundant filler.

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

Completeness4/5

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

The description is largely complete for a two-parameter mutation tool with an output schema and no annotations. It documents parameters and side effects thoroughly, though it omits prerequisites such as requiring existing embeddings in vault.db and does not position the tool relative to its siblings.

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%, so the description must compensate for both parameters. It does: note_path is defined as a relative path to a single note, with empty string meaning all notes lacking neighbor_keywords, and force is defined as overwriting existing values with the default being to skip.

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 states a specific verb and resource: enrich notes with neighbor_keywords and cluster_topic derived from embedding similarity. It clearly distinguishes the mechanism by explaining cosine similarity and top-5 neighbors, but it does not explicitly differentiate this tool from similarly named siblings such as expand_semantic_keywords_tool.

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

Usage Guidelines3/5

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

The description explains parameter behavior, including that an empty note_path processes all notes without neighbor_keywords and that force overwrites existing data. However, it does not say when to choose this tool over alternatives, nor does it name any alternative for semantic keyword expansion or related-note discovery.

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