Skip to main content
Glama
IBazylchuk

Paparats: Local Semantic Code Search

Record Component

arch_record_component
Idempotent

Record or update an architectural component by name, capturing its purpose, boundaries, stable code anchors, and neighbours so semantic code-search context stays current after refactors.

Instructions

Record (or update by name — idempotent) an architectural component. Use when you discover a logical unit not already in arch_context, or when an existing component's boundary changes. The summary field is structured markdown with four sections (Does / Owns / Does not / Touched when); anchors are stable exported symbol names that survive a refactor. Returns status created or updated.

Input Schema

NameRequiredDescriptionDefault
nameYesComponent name, unique per (group, project). Stable, refactor-resistant — e.g. "file indexer", not "Indexer (in indexer.ts)".
filesNoRepository paths the component spans (e.g. packages/server/src/indexer.ts).
groupYesTarget group
anchorsNoExported class / function / constant names that survive refactors. Used later to verify the card is not pointing at deleted code.
projectYesRequired. Project the component belongs to — the same value the indexer writes as `payload.project` on code chunks (typically the repo directory basename). Components in the same group with the same name but different projects coexist independently.
summaryYesMarkdown with four sections, each one or two short lines: - **Does:** what it does - **Owns:** state / DB tables / external IO it controls - **Does not:** one or two things it explicitly does NOT do (boundary) - **Touched when:** what kind of change forces editing this component
neighboursNoNames of related components (matches `name` of other arch_record_component entries).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, openWorldHint=false, and the description is consistent with them. It adds value by disclosing the return statuses (created | updated) and the fact that identity is the component name. It omits a key behavioral detail for an upsert: whether omitted fields on update merge or are replaced.

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?

Four compact sentences in a logical order: action, when to use, field semantics, return value. The most decision-relevant information is front-loaded and nothing is padded.

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?

A seven-parameter, four-required mutation tool with no output schema is well served by a description that names the return statuses and explains the two least obvious fields. The remaining gap is the update/merge behavior, which matters for an idempotent upsert but is not addressed.

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%, so all seven parameters are already documented, including the summary four-section structure and anchors stability. The description largely restates schema content (summary sections, anchors surviving refactors) rather than adding format or constraint details, so baseline 3 applies.

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?

States a specific verb+resource (record an architectural component), adds the upsert-by-name idempotent behavior, and names the exact prerequisite store (arch_context). It is clearly distinguishable from siblings like arch_record_decision and arch_record_lesson.

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

Usage Guidelines4/5

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

Gives explicit triggers: a logical unit not already in arch_context, or an existing component whose boundary changed. It does not state when NOT to use it (e.g., versus arch_suggest_components or arch_record_decision), so it falls short of the full when/when-not/alternatives bar.

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