Skip to main content
Glama

Metadata extraction module with pytest tests

submit_metadata_extraction
Idempotent

Produce a standard-library Python module that extracts key/value metadata from a document head, plus pytest tests. Choose this when 'key: value' metadata must be read from the head of a text document, preserving duplicate keys rather than overwriting. Do not choose this for YAML/TOML front matter parsing or for metadata spread through the body. Example requests: Write a Python module that extracts 'key: value' metadata from a document head, with tests. | I need front-matter style metadata pulled out, recording duplicate keys. | Generate a metadata-extraction module and test 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_metadata_extraction"
  }
}

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.4/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 genuine behavioral content beyond that: duplicate keys must be preserved rather than overwritten, and the output is an uninstalled stdlib-only module rather than a direct transformation. It does not discuss the priced-job/quote authorization flow, though that is carried by the schema.

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?

Front-loaded purpose, then selection criteria, then exclusions, then examples. Every sentence carries selection-relevant information and nothing is redundant.

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, so return values need no explanation, and the schema covers quote_id, accepted_price, and authorized_by. The description fully specifies the artifact's semantics; only the job-submission workflow context is left implicit, which the annotations and schema already supply.

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 module_name, function_name, and template with patterns and meanings. The description adds nothing about those parameters, leaving the baseline 3 appropriate since the schema does the heavy lifting.

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 and deliverable (a standard-library Python module plus pytest tests) and pins the domain to key/value metadata in a document head. It explicitly draws the boundary against YAML/TOML front matter and body-level metadata, which separates it from submit_text_parser_module and submit_env_config_parsing.

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 an explicit when-to-choose condition ('key: value' metadata read from the head of a text document, duplicates preserved) and an explicit when-not ('YAML/TOML front matter', 'metadata spread through the body'). Three example requests show the phrasing an agent would realistically receive.

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