Skip to main content
Glama

Regulatory checks: evaluate record or CBAM declaration

compliance_evaluate

Use this when a user wants an import record or an annual EU CBAM declaration (Reg. (EU) 2023/956) checked against an approved policy before filing. Do not use for carbon-footprint calculations or for regulations compliance_policies does not list.

Runs the policy's regulation-derived Rego, not the generic OFP validator. The decision is passed, denied, unevaluable, not_applicable or error; an error is a refusal, never compliance, and error.code names it (policy_not_release_eligible, policy_no_rendered_checks, policy_no_faithful_checks, policy_coverage_inconsistent, policy_hash_mismatch, policy_hash_unverified). A pass covers only the encoded checks: read coverage.note. Requires the compliance:evaluate scope; every call counts against the plan limit. For an annual CBAM declaration set entity_type to cbam_declaration and send declaration + lines.

Input Schema

NameRequiredDescriptionDefault
linesNo
entityNo
contextNo
evidenceNo{kind, ref, sha256}; sha256 is 64 hex characters
policy_idYes
declarationNo
entity_typeNocarbon_measure (default) or cbam_declaration

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Well beyond the annotations (which only mark it non-read-only, non-idempotent, non-destructive): the description discloses the five decision outcomes, that an error is a refusal and never compliance, the specific error.code values, the scope requirement (compliance:evaluate), and that every call counts against the plan limit. The remaining gap is that the response payload shape and the meaning of coverage.note are only alluded to, and nothing explains the cost or side effect implied by readOnlyHint=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?

Front-loaded with the use case and exclusions, then behavior, then parameter guidance; every sentence carries information. It is dense, and the parenthetical error-code list is a long enumeration, but it is genuinely needed to interpret refusals rather than filler.

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?

For a seven-parameter, nested-object tool with no output schema, the definition covers the decision semantics, refusal semantics, scope, and billing impact, which are the highest-risk unknowns. It stops short of describing the evaluation result contents or what entity/context/evidence should contain, which is the main remaining hole.

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 low (29%), so the description must carry weight; it adds real meaning for entity_type (cbam_declaration vs. the carbon_measure default) and for the declaration/lines pairing, plus the acceptance criterion on evidence. But entity, context, and policy_id receive no semantic explanation at all, leaving several nested-object parameters undocumented in both places.

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?

The description states a precise verb and scope: checking an import record or an annual EU CBAM declaration against an approved policy before filing. It explicitly separates this from the generic OFP validator and from carbon-footprint calculations, so an agent can distinguish it from ofp_validate and the compliance_policies family without opening schemas.

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?

It gives an explicit when-to-use condition ('before filing'), two when-not-to conditions (carbon-footprint calculations, regulations not listed by compliance_policies), and names an alternative (the generic OFP validator, via ofp_validate). It also supplies the concrete invocation pattern for the CBAM case: set entity_type to cbam_declaration and send declaration + lines.

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.