Skip to main content
Glama

metrics_update

Update a metric. For a deterministic check set metric_type:"check" and check_config. Per-kind required keys: value (contains/not_contains/equals/list_overlap/numeric_equals), pattern (regex), json_path+expected (json_path_equals), min and/or max (length_bounds/numeric_bounds); valid_json takes no extra keys. target_path is required when target is json_path; a target_path sent with no target sets target to json_path, and one sent with any other target is refused. target_path walks array indices, as in items.0.name; any path may start at the root with $., as in $.items.0.name. list_overlap grades a list-valued field and stores a fraction rather than a verdict: score_by is recall, precision, f1 or jaccard (recall by default), and min is the fraction that counts as a pass (1, a perfect score, by default). numeric_bounds and numeric_equals read a number, ignoring the thousands commas and currency symbol a figure is written with; a comma counts only as a thousands separator, with three digits after it and no decimal point before it, so 1,5 is not a number; numeric_equals takes a tolerance, either a plain number for a fixed amount or a percentage string such as 2% for a share of the expected value. A check with no case_sensitive matches case-insensitively, regex and list_overlap included; send case_sensitive: true to match case exactly. Before 0.29.0 a regex check read a missing case_sensitive as case-sensitive. Set compare_to:"expected" on contains, not_contains, equals, json_path_equals, list_overlap, numeric_equals to grade against each row's own expected_output (ground truth) instead of a constant; drop value (or expected, for json_path_equals) and add expected_path to dig into the answer key when it is JSON.

Input Schema

NameRequiredDescriptionDefault
idYes
nameNo
tag_namesNo
instructionNo
metric_typeNo
check_configNo
rubric_bandsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / check_config / properties / case_sensitive / description
      Added value: +"A check with no case_sensitive matches case-insensitively, regex and list_overlap included; send case_sensitive: true to match case exactly. Before 0.29.0 a regex check read a missing case_sensitive as case-sensitive."
    • changedInput schema / properties / check_config / properties / check_kind / enum
      Previous value: -[
      -  "contains",
      -  "not_contains",
      -  "equals",
      -  "regex",
      -  "valid_json",
      -  "json_path_equals",
      -  "length_bounds"
      -]New value: +[
      +  "contains",
      +  "not_contains",
      +  "equals",
      +  "regex",
      +  "valid_json",
      +  "json_path_equals",
      +  "length_bounds",
      +  "list_overlap",
      +  "numeric_bounds",
      +  "numeric_equals"
      +]
    • changedInput schema / properties / check_config / properties / max / type
      Previous value: -"integer"New value: +"number"
    • changedInput schema / properties / check_config / properties / min / type
      Previous value: -"integer"New value: +"number"
    • addedInput schema / properties / check_config / properties / score_by
      Added value: +{
      +  "enum": [
      +    "recall",
      +    "precision",
      +    "f1",
      +    "jaccard"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / check_config / properties / tolerance
      Added value: +{
      +  "description": "A plain number for a fixed amount, or a percentage string such as \"2%\" for a share of the expected value",
      +  "type": [
      +    "number",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / check_config / properties / value / description
      Added value: +"Only list_overlap takes a list, as a JSON array or as comma-separated text; every other rule refuses one"
    • addedInput schema / properties / check_config / properties / value / items
      Added value: +{
      +  "type": [
      +    "string",
      +    "number"
      +  ]
      +}
    • changedInput schema / properties / check_config / properties / value / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "array"
      +]
  2. First observed

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so substantively: it discloses refusal behavior ('a target_path ... sent with any other target is refused'), implicit defaults (recall, min=1, case-insensitive matching), and a version-dependent quirk (pre-0.29.0 regex case handling). It omits the core mutation semantics — whether the update merges or replaces unspecified fields, and any permission requirements — which keeps it out of the top band.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence carries genuine technical content with little padding, and the purpose statement is front-loaded. However, it is one unbroken, extremely dense paragraph mixing required-key rules, path syntax, numeric parsing, case-sensitivity history, and comparison modes — bullet structure or per-kind grouping would make it far easier to parse at invocation time.

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

Completeness3/5

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

For a 7-parameter tool with a nested object, no output schema, and no annotations, the description covers the check branch thoroughly but leaves the llm_judge branch unexplained (rubric_bands and instruction are never mentioned) and gives no update semantics for the top-level fields. It is complete for one metric_type and incomplete for the other.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Top-level schema description coverage is 0%, so the description must compensate, and for the complex nested check_config it does so richly: per-check_kind required keys, target_path resolution and root syntax, score_by and min semantics for list_overlap, tolerance formats, and compare_to/expected_path behavior. It says nothing about the top-level id, name, tag_names, instruction, or rubric_bands parameters, leaving a real gap.

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 opening sentence 'Update a metric' gives a clear verb and resource, and the body makes the check-configuration scope concrete. It never names or distinguishes itself from the sibling metrics_create, so an agent must infer the update-vs-create boundary. Purpose is unambiguous but lacks sibling differentiation.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no reference to alternatives such as metrics_create or metrics_get. The only routing hint is 'For a deterministic check set metric_type:"check"', which is a configuration instruction rather than a usage policy. The agent gets no help choosing this tool over its siblings.

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.