Skip to main content
Glama

Compare assessments

lca_compare_assessments

Save a comparison across 2–9 saved assessments. Each target is an a<N> ref (lca_get(kind='assessments') lists them); every lca_run_assessment already saved one. Two preconditions are enforced (400): all targets share one LCIA method (one method, not one name: each source has its own, so two sources' assessments are usually refused), and all are one product at one amount unless function states the function they all deliver. Differences in allocation 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.

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": {
      "workspace": "<workspace>",
      "targets": "<targets>"
    },
    "name": "lca_compare_assessments"
  }
}

Input 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.
phasesNoRead the comparison you save under these life-cycle phases: the backend sums each target's selected phases. A read, never stored — the saved comparison is the same with or without it, so to re-read an EXISTING comparison by phase use `lca_get(ref='c<N>', phases=…)` rather than comparing again. When not every part of every target is tagged, no value is marked lowest. Each value is a phase (production, distribution, use, end_of_life, beyond_boundary) or 'unassigned' (the parts no tag files). Omitted = the default total (every phase except beyond_boundary, plus unassigned). Refused, with the reason, when the result's phase rows are incomplete; a part nobody tagged counts only under 'unassigned'.
targetsYes2 to 9 saved-assessment refs to compare, e.g. ['a1', 'a2']. For more than 9, compare in groups that share one reference assessment.
functionNoThe function every target delivers, quantified — e.g. 'packaging for 1 L of beverage'. Needed when the targets are not the same product at the same amount: take it from the user's stated goal, or ask them. Saved with the comparison and shown wherever it is read.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / targets / description
      Previous value: -"2 to 8 saved-assessment refs to compare, e.g. ['a1', 'a2']. For more than 8, compare in groups that share one reference assessment."New value: +"2 to 9 saved-assessment refs to compare, e.g. ['a1', 'a2']. For more than 9, compare in groups that share one reference assessment."
    • changedInput schema / properties / targets / maxItems
      Previous value: -8New value: +9
  2. Changed1 schema field changed
    • addedInput schema / properties / phases
      Added value: +{
      +  "description": "Read the comparison you save under these life-cycle phases: the backend sums each target's selected phases. A read, never stored — the saved comparison is the same with or without it, so to re-read an EXISTING comparison by phase use `lca_get(ref='c<N>', phases=…)` rather than comparing again. When not every part of every target is tagged, no value is marked lowest. Each value is a phase (production, distribution, use, end_of_life, beyond_boundary) or 'unassigned' (the parts no tag files). Omitted = the default total (every phase except beyond_boundary, plus unassigned). Refused, with the reason, when the result's phase rows are incomplete; a part nobody tagged counts only under 'unassigned'.",
      +  "items": {
      +    "enum": [
      +      "production",
      +      "distribution",
      +      "use",
      +      "end_of_life",
      +      "beyond_boundary",
      +      "unassigned"
      +    ],
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / targets / description
      Previous value: -"Saved-assessment refs to compare, e.g. ['a1', 'a2']. Must have ≥2 items."New value: +"2 to 8 saved-assessment refs to compare, e.g. ['a1', 'a2']. For more than 8, compare in groups that share one reference assessment."
  4. Changed2 schema fields changed
    • removedInput schema / properties / allow_mismatched_fu
      Removed value: -{
      -  "default": false,
      -  "description": "Compare 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.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / function
      Added value: +{
      +  "description": "The function every target delivers, quantified — e.g. 'packaging for 1 L of beverage'. Needed when the targets are not the same product at the same amount: take it from the user's stated goal, or ask them. Saved with the comparison and shown wherever it is read.",
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "type": "string"
      +}
  5. 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"
      +}
  6. 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."
  7. 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
  8. 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"
      +]
  9. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations: discloses that method mismatch across sources is usually refused (not merely a name comparison), that allocation/provider-linking differences surface as equivalence warnings rather than refusals, that the result is persisted and returned as a `c<N>` `primary_ref`, and that the matrix does not rank targets. The `nw_set` requirement (every target must already carry it, via `lca_apply_nw_set`) and the note that re-reading rather than re-comparing is preferred also cover the non-idempotent behavior flagged by `idempotentHint=false`.

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?

Purpose, preconditions, and return contract are front-loaded in that order, and nearly every sentence carries decision-relevant information. It is nonetheless dense and multi-clause, with some overlap between the prose and the already-verbose schema descriptions, so it reads heavier than it needs to.

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?

There is no output schema, and the description compensates fully: it names the returned `primary_ref` shape, what the matrix contains, that it does not rank, and how warnings accompany the result. For a mutation tool with enforced preconditions and persistence side effects, nothing an agent needs in order to call it correctly is missing.

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% and the per-parameter descriptions are already very rich, so much of the description's parameter content (nw_set requirement, phases-are-a-read-not-stored, workspace naming rationale) duplicates the schema. What it adds is the linking of `function` to the precondition it unlocks and the practical grouping advice for more than 9 targets, which frames the parameters in operational terms rather than restating them.

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?

Opens with a specific verb and resource plus scope: 'Save a comparison across 2–9 saved assessments.' It immediately tells the agent where the targets come from (`a<N>` refs, listed by `lca_get(kind='assessments')`, produced by `lca_run_assessment`), which cleanly separates it from the sibling that creates assessments and the sibling that reads them.

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?

Explicitly routes the agent away from this tool when re-reading an existing comparison by phase, naming `lca_get(ref='c<N>', phases=…)` as the alternative and stating why ('the saved comparison is the same with or without it'). It also states the two refusal preconditions (one LCIA method, one product at one amount unless `function` is supplied) so the agent knows when a call will fail before making it.

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