Skip to main content
Glama

Regulatory checks: evaluate record or CBAM declaration

compliance_evaluate

Use this when an import record or annual EU CBAM declaration (Reg. (EU) 2023/956) needs an approved-policy check before filing. Not for footprint calculations or unlisted regulations.

Runs regulation-derived Rego, not the generic OFP validator. Decision: passed, denied, unevaluable, not_applicable or error (a refusal, never compliance; error.code: policy_not_release_eligible, policy_no_rendered_checks, policy_no_faithful_checks, policy_coverage_inconsistent). A pass covers only the encoded checks: read coverage.note. Requires the compliance:evaluate scope; calls count against the plan limit. CBAM: entity_type cbam_declaration (default carbon_measure), declaration + lines.

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": {
      "policy_id": "<policy_id>"
    },
    "name": "compliance_evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesNo
entityNo
contextNo
evidenceNo
policy_idYes
declarationNo
entity_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / entity_type / description
      Removed value: -"carbon_measure (default) or cbam_declaration"
    • removedInput schema / properties / evidence / description
      Removed value: -"{kind, ref, sha256}; sha256 is 64 hex characters"
  2. Changed8 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / context / description
      Removed value: -"Evaluation context passed to the policy"
    • removedInput schema / properties / declaration / description
      Removed value: -"For entity_type \"cbam_declaration\": the annual declaration — declaration_id, authorised_declarant_id, reporting_year, submitted_date, status, free_allocation_adjustment_tco2e, carbon_price_reduction_tco2e, certificates_to_surrender, total_embedded_emissions_tco2e and declarant {eori_number, authorisation_status, cbam_account_number}"
    • removedInput schema / properties / entity / description
      Removed value: -"The record to evaluate (omit for a cbam_declaration). CBAM fields include cn_code, aggregated_goods_category, quantity_value, quantity_unit, specific_direct_embedded_emissions, installation_country_id, production_route, period_start and period_end (the reporting period; the typed reporting_period_start/reporting_period_end pair is also accepted)"
    • changedInput schema / properties / entity_type / description
      Previous value: -"Record type; defaults to carbon_measure, which is what the CBAM calculation policy evaluates. Use cbam_declaration for an annual declaration (send declaration + lines, not entity)"New value: +"carbon_measure (default) or cbam_declaration"
    • changedInput schema / properties / evidence / description
      Previous value: -"Evidence references: {kind, ref, sha256, period_start?, period_end?, installation_id?, payload?}. Kinds: installation, production_record, meter, emission_factor, precursor_emissions, verification_report, carbon_price_payment. A carbon_price_payment payload documents the country, price, currency and proof of payment and names an independent certifier (Reg (EU) 2023/956 Art 9(2)). sha256 is 64 hex characters; anything else is refused."New value: +"{kind, ref, sha256}; sha256 is 64 hex characters"
    • removedInput schema / properties / lines / description
      Removed value: -"For entity_type \"cbam_declaration\": the declaration lines. Each carries declaration_line_id, record_id (the carbon_measure record it summarises), cn_code, country_of_origin_id, installation_id, total_quantity, unit, total_embedded_emissions_tco2e, specific_embedded_emissions, emissions_basis, verification_report_id, customs_declaration_reference, imports[{import_id, customs_declaration_reference, import_date, cn_code, net_mass_t, ...}], entity, context and evidence"
    • removedInput schema / properties / policy_id / description
      Removed value: -"Approved policy id from compliance_policies"
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it enumerates the five decision outcomes, warns that 'error' is a refusal and never a compliance result, lists the four error codes, and stresses that a pass covers only encoded checks (read coverage.note). It also discloses that calls count against the plan limit and that the engine is regulation-derived Rego, not the generic validator.

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 trigger and the exclusions, then behavior, then CBAM specifics — a sensible order. The dense parenthetical error-code list is compact but readable; only minor trimming would help.

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?

With no output schema the description correctly covers return semantics (decision values, error codes, coverage caveat), and annotations handle safety. The gap is input-side: for a 7-parameter tool with nested objects and no schema descriptions, the roles of entity, context, evidence and policy_id are never described, which leaves invocation under-specified.

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 description coverage is 0%, so the description must compensate, and it only partly does: it names entity_type (cbam_declaration, default carbon_measure), declaration and lines, but leaves policy_id, entity, context and evidence unexplained. Three of seven parameters remain opaque for a call with nested objects.

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+resource: an approved-policy check on an import record or an annual EU CBAM declaration under Reg. (EU) 2023/956. It explicitly distinguishes itself from the generic OFP validator and from footprint calculations, so an agent can separate it from ofp_validate without reading either schema.

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 trigger ('when an import record or annual EU CBAM declaration needs an approved-policy check before filing') plus exclusions ('not for footprint calculations or unlisted regulations') and the prerequisite scope (compliance:evaluate). The CBAM invocation path is spelled out with entity_type and payload shape.

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.