Skip to main content
Glama

Compare assessments

lca_compare_assessments

Save a comparison across 2–8 saved assessments. Each target is an a<N> ref (listable with lca_get(kind='assessments')); every lca_run_assessment call already saves one, so there is no separate save step. Two preconditions are enforced (400): all targets share one LCIA method, and all declare the same functional unit — comparing 1 kg against 1 unit is refused unless allow_mismatched_fu is set. Differences in allocation, database or provider linking are not refused; they are returned as equivalence warnings alongside the result. The comparison is saved into the workspace named by workspace and returned as primary_ref (c<N>), which holds the full matrix. The matrix does not rank the targets; it reports each impact category separately. nw_set adds the targets' stored single scores for that set beside the matrix; every target must already carry it (lca_apply_nw_set). The assessment_interpretation skill (load_skill) documents comparison discipline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nw_setNoCompare by the single score of this normalization/weighting set (its name, or a unique part of it); every target must carry it, see `lca_apply_nw_set`. A target missing it, or carrying a different copy, is refused with what to do. Omit for the characterized matrix only.
targetsYesSaved-assessment refs to compare, e.g. ['a1', 'a2']. Must have ≥2 items.
workspaceYesName of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace. The connection's default is often an empty sandbox rather than the user's work.
allow_mismatched_fuNoCompare targets that declare DIFFERENT functional units (e.g. 1 kg vs 1 unit). Default false refuses with a 400 naming both. Setting it true does NOT make the comparison valid — it stamps a warning onto the result. Only set it when the user has said the two functional units are equivalent for their question, and say so in your answer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / nw_set
      Added value: +{
      +  "description": "Compare by the single score of this normalization/weighting set (its name, or a unique part of it); every target must carry it, see `lca_apply_nw_set`. A target missing it, or carrying a different copy, is refused with what to do. Omit for the characterized matrix only.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / workspace / description
      Previous value: -"Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace."New value: +"Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace. The connection's default is often an empty sandbox rather than the user's work."
  3. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Changed2 schema fields changed
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace.",
      +  "maxLength": 255,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "targets"
      -]New value: +[
      +  "workspace",
      +  "targets"
      +]
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent mutation; the description adds substantial context beyond them: which mismatches are refused with 400 vs returned as equivalence warnings, that the result is saved into the named workspace and returned as `primary_ref` (`c<N>`), and that the matrix does not rank targets. This is rich behavioral disclosure the annotations alone do not convey.

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 action and sized appropriately for a tool with four interacting parameters and several preconditions. Sentences are dense and cross-reference other tools heavily, which is efficient but places a mild reading burden; nearly every clause carries distinct information, so little is wasted.

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?

With no output schema, the description still explains the return (`primary_ref` `c<N>` holding the full matrix, plus `nw_set` scores beside it), the refusal behavior, and the interpretation skill pointer. For a mutation tool with non-obvious preconditions, this is complete enough to invoke correctly.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond it: `a<N>` ref shape and its source (`lca_get`), the requirement that every target already carry `nw_set`, and the consequence of `allow_mismatched_fu` (a warning is stamped, not validity). The workspace rationale (shared connection, empty default sandbox) further clarifies its purpose.

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 resource ('Save a comparison across 2–8 saved assessments') and immediately scopes it against siblings: it notes that `lca_run_assessment` already saves each assessment so there is no separate save step, and directs listing to `lca_get(kind='assessments')`. An agent can distinguish this from the analyze/compose siblings without opening any schema.

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 clear conditions: use for 2–8 saved refs, the two enforced 400 preconditions, and precise guidance on when to set `allow_mismatched_fu` (only when the user asserts equivalence). It does not explicitly contrast when to reach for this versus `lca_analyze_contributions`/`lca_analyze_sensitivity`, so it falls short of a full when/when-not/alternatives treatment.

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