Skip to main content
Glama

Record deduplication module with pytest tests

submit_record_deduplication
Idempotent

Produce a standard-library Python module that removes duplicate objects from a JSON array, plus pytest tests. Choose this when duplicates must be removed from a JSON array, keeping the first occurrence and preserving order, optionally on a key subset. Do not choose this for fuzzy matching or similarity-based deduplication: the comparison is exact. Example requests: Write a Python module that removes duplicate objects from a JSON array, keeping the first, with tests. | I need deduplication by a key subset that preserves input order. | Generate a dedupe module and a pytest suite for it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inputs": "<inputs>",
      "authorized_by": "<authorized_by>"
    },
    "name": "submit_record_deduplication"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes
quote_idNoThe quote_id returned by POST /v1/jobs. Required to authorize a priced capability; the service rejects a priced job that does not name the quote it issued.
authorized_byYesIdentifier of the human or agent authorizing this job.
accepted_priceNoThe amount accepted, exactly as quoted (for example "5.00" or 5). Checked against the stored quote, so a price that moved between quote and authorize is refused rather than silently absorbed. Optional, but sent to make the acceptance explicit.

Output Schema

NameRequiredDescriptionDefault
quoteNo
stateYes
job_idYes
artifactsNo
access_tokenNoPer-job credential. Present it as the X-Job-Token header to read the job or list it. Keep it; it is the only credential for this job.
verificationNoIndependent verification. verification.ok = false means the job failed, not a partial success.
capability_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds real behavioral detail the annotations cannot: exact (non-fuzzy) comparison, first-occurrence retention, and order preservation. It is silent on the priced-job/quote authorization flow, which is behavioral context an agent would benefit from knowing before calling.

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?

Front-loaded with the core deliverable, then the selection rule, then the exclusion. The example-request list is somewhat redundant with the preceding sentences but does earn its place as routing anchors.

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?

An output schema exists and the nested input schema documents the template and naming fields, so return values and parameter shapes need not be restated. The remaining gap is the pricing/authorization workflow (quote_id, accepted_price), which is only explained in the schema and never surfaced in the description.

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 coverage is 75% and the nested inputs object documents template, module_name, and function_name individually, so the schema carries most of the weight. The description mentions the key-subset option but never maps to the actual parameters or the quote_id/accepted_price authorization fields, so it adds little beyond 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 names a concrete verb and artifact: produce a standard-library Python module that dedupes a JSON array, plus pytest tests. It also states the exact semantics (keep first occurrence, preserve order, optional key subset), which separates it from the many other submit_* generation tools.

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?

Explicit when-to-use (duplicates must be removed from a JSON array, exact comparison) and an explicit exclusion ('Do not choose this for fuzzy matching or similarity-based deduplication'), plus three example requests that anchor the routing decision.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources