Skip to content

feat(compliance): add get_compliance_reports_by_batch tool and surface batchId - #410

Merged
AutomateIP merged 1 commit into
itential:develfrom
AutomateIP:feature/compliance-reports-by-batch
Aug 18, 2026
Merged

feat(compliance): add get_compliance_reports_by_batch tool and surface batchId#410
AutomateIP merged 1 commit into
itential:develfrom
AutomateIP:feature/compliance-reports-by-batch

Conversation

@AutomateIP

Copy link
Copy Markdown
Collaborator

Summary

Adds a new read-only tool get_compliance_reports_by_batch(ctx, batch_id) and
fixes a bug where run_compliance_plan silently discarded the platform's
batchId. The two changes are coupled: the new tool needs a batch ID, which
was previously being dropped before the caller could ever see it.

Changes

Testing

  • make ci passes clean (2858 tests).
  • Integration-tested against a real live Itential Platform: ran a real
    compliance plan ("NERC-CIP Cisco IOS Compliance Plan"), confirmed the
    response now includes a populated batchId, then called
    get_compliance_reports_by_batch with that real batch ID and received 4 real
    per-device compliance report records with correct schema. No regression on
    describe_compliance_report or get_compliance_plans.

Known limitations

  • The batch-reports endpoint returns an empty list both when a batch has zero
    matching devices and when the batch ID is unknown/nonexistent. Callers cannot
    currently distinguish these two cases from the response alone.

Related Issues

Roadmap: 0.15.0 Tier C #10.

…e batchId

run_compliance_plan silently discarded the platform's batchId field; it is
now surfaced as an optional batchId: str | None (graceful degradation over
strict validation). Adds a new read-only tool get_compliance_reports_by_batch
with matching service method and models validated field-by-field against the
platform OpenAPI spec.
@AutomateIP AutomateIP added the new tool Adds a new tool to the MCP server label Aug 18, 2026
@AutomateIP
AutomateIP merged commit 515fc76 into itential:devel Aug 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new tool Adds a new tool to the MCP server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant