Skip to main content
Glama

Quant Swarm Audit — Compare Before/After Audit Bundles

audit.compare
Read-onlyIdempotent

Compares two completed trading-strategy audit jobs to show before/after differences in Sharpe, net edge, cost sensitivity, drawdown, trade concentration, and resolved versus new warnings.

Instructions

Compares two completed audit jobs (version A vs version B or before/after remediation). Returns a structured diff of Sharpe, net edge, cost sensitivity, drawdown, trade concentration, and resolved vs new warnings.

Input Schema

NameRequiredDescriptionDefault
job_id_aYesBaseline / before-remediation audit job_id.
job_id_bYesCandidate / after-remediation audit job_id.
output_html_pathNoOptional file path to write the standalone before/after comparison HTML report.

Output Schema

NameRequiredDescriptionDefault
howNo
modeNo
toolNo
errorNo
accessNo
job_idNo
reasonNo
statusNo
metricsNo
eligibleNo
findingsNo
gbp_costNo
job_id_aNo
job_id_bNo
next_stepNo
strategy_aNo
strategy_bNo
html_reportNo
max_creditsNo
credits_costNo
generated_atNo
input_sha256No
metrics_diffNo
new_warningsNo
preflight_idNo
random_seedsNo
has_benchmarkNo
strategy_nameNo
written_filesNo
approval_tokenNo
execution_planNo
input_sha256_aNo
input_sha256_bNo
trades_summaryNo
artifact_hashesNo
coverage_matrixNo
credits_chargedNo
idempotency_keyNo
markdown_reportNo
package_versionNo
returns_summaryNo
assessment_afterNo
cost_assumptionsNo
headline_metricsNo
not_tested_countNo
required_creditsNo
assessment_beforeNo
idempotent_replayNo
request_access_atNo
resolved_findingsNo
validation_errorsNo
counts_by_categoryNo
overall_assessmentNo
finding_transitionsNo
remediation_verdictNo
has_features_manifestNo
not_investment_adviceNo
outbound_data_previewNo
reproducibility_bundleNo
estimated_runtime_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is covered. The description adds that the result is a structured diff scoped to six metric families plus resolved-vs-new warnings, which is useful, but says nothing about what happens with mismatched or incompatible job pairs, or about any cost/latency of the comparison.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler: the operation and its comparison modes come first, then the payload contents. Every clause carries information an agent cannot get from the name alone.

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?

With an output schema present and full parameter coverage, the description only needs to frame scope and return shape, which it does. The remaining gap is edge-case behavior — whether the two job_ids must share strategy/universe/config for a meaningful diff — which an agent might want before calling.

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 100%, with job_id_a documented as baseline/before and job_id_b as candidate/after, and output_html_path as an optional report target. The description's 'version A vs version B or before/after remediation' phrasing reinforces the A/B semantics but adds no syntax, format, or constraint detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource: 'Compares two completed audit jobs' with an explicit before/after framing, and enumerates the compared metrics (Sharpe, net edge, cost sensitivity, drawdown, trade concentration, warnings). It does not name a sibling (e.g., audit.report for single-job output), so differentiation from the rest of the audit.* family is inferred rather than stated.

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 use contexts — version A vs version B, or before/after remediation — and an implicit precondition that both jobs be 'completed'. It stops short of explicit exclusions or pointing at alternatives such as audit.report when only one bundle needs rendering.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.