Skip to main content
Glama

batch_add

Record multiple code finding observations in one batch, deduplicating each by fingerprint to create or update the corresponding tracker card.

Instructions

Record multiple finding observations at once (deduplicated by fingerprint).

Members are deduplicated exactly like add — including against each other, so two members sharing a fingerprint yield one insert plus one bump. One result per input, in input order. Unknown member keys are refused.

Each result carries the same discriminators add returns, and the same four dedup_action values: "created", "bumped", "reopened" and "recurrence_of_closed", the last of which reports was_new: true because it files a NEW row linked to a dismissed twin via meta.recurrence_of.

Each result also carries its OWN attention list — always present, often empty, never shared between members. Two record forms exist, in this order and at most once each: {signal: severity_escalated, from, to} on the bumped and reopened branches, meaning that member's observation raised the stored finding's severity; and {signal: category_divergence, observed, stored} on every branch with a matched row (bumped, reopened, and the recurrence branch, where the comparison is against the dismissed twin), meaning that member does not NAME the matched finding's category. Both category sides are normalized, so a difference of spelling is not a signal; a stored category that is not text is skipped rather than raising.

Each result also carries its OWN stripped_meta_keys list — always present, often empty, never shared between members — following the same discipline: a meta key that is identity machinery OUTPUT (e.g. occurrences, recurrence_of, category_minted) is stripped from what gets stored rather than refused, and reported here so a caller forwarding a fetched card's meta can tell which of its own keys silently did not land. resolver_errors is refused outright instead (a FAILURE state, not machinery input), on this path exactly as on add.

Each result likewise carries its OWN stripped_description_tail boolean — always present, usually False, meaning "checked, nothing to cut" rather than "no such channel". A leaked tool-call tail on that member's description (envelope lines and nothing else after a </description> marker) is CUT rather than refused, before the fingerprint is derived so a tailed and a clean report of one defect collapse onto one card; prose merely quoting the marker is left alone. True means that member's stored text is not the text you passed.

Args:

  • findings: List of finding objects, each with keys: severity, category, file, description, and optionally: lines, source, tags, meta, reported_at_commit, reported_at_ref, fingerprint. lines is per-member and works exactly as it does on add: it is WHERE IN THE CODE that member is, and the only input that gives its card a durable ANCHOR surviving later edits to the file. A bare number ("1850"), a range ("1850-1870"), a full "path/file.py:1850" token (whose path must name that member's own file) or a list of lines. Omit it on a member that describes no place in the code rather than inventing one. It is the same field as that member's meta.lines, and the two are refused when they disagree.

  • reported_at_commit: Default commit SHA for all findings (auto-detected if omitted). Per-finding values override this.

  • reported_at_ref: Default version label for all findings. Per-finding values override this.

  • new_category: Batch-wide permission to MINT categories the tracker does not hold yet (CB-60); the first member introducing a category is stamped meta.category_minted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findingsYes
new_categoryNo
reported_at_refNo
reported_at_commitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.2.2

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It does so extensively: deduplication across members, result ordering, one-result-per-input, refusal of unknown keys, the four `dedup_action` branches, per-member `attention`, `stripped_meta_keys`, `stripped_description_tail`, and `new_category` minting behavior. This is far beyond a minimal safety or mutation warning.

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?

The description is long, but the complexity of the behavior justifies most of it. It is front-loaded with the central purpose and dedup rule, then methodically covers result semantics and argument details. Some redundancy exists (e.g., repeated 'always present, often empty, never shared' phrasing), so it is not maximally concise, but every major clause adds operational value.

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?

Given the sparse schema, absent annotations, and rich behavioral surface, the description is remarkably complete. It covers input requirements, deduplication, result shape, edge cases for meta stripping and description tails, failure behavior for unknown keys and `resolver_errors`, and category minting. An agent can invoke this tool correctly without needing external documentation.

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?

The input schema is nearly empty—0% schema description coverage—so the description fully compensates. The Args section details every parameter: `findings` item keys with `lines` semantics and constraints, per-finding overrides for `reported_at_commit` and `reported_at_ref`, and the batch-wide `new_category` permission. This gives an agent everything needed to construct valid arguments.

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 opening sentence, 'Record multiple finding observations at once (deduplicated by fingerprint)', states a specific verb, resource, and key behavior. It clearly distinguishes this tool from single-item alternatives like `add` and other sibling tools by emphasizing batch operation and deduplication semantics.

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?

The description makes the tool's intended use evident—recording multiple findings at once—and repeatedly anchors behavior to `add`, making the relationship to the single-finding alternative clear. It does not explicitly say 'use this when you have multiple findings and use `add` for a single one', but the batch focus and cross-references provide strong contextual guidance.

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

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/faxik/codebugs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server