Skip to main content

Report Schemas

Reports are deterministic diagnostics. They are meant to be stored in product metadata, shown in collection UIs, and used as regression gates. The same input spec and options should produce the same report.

OpenAPI Collection Report

analyze_openapi_collection() and ToolGraph.analyze_openapi() return an OpenAPICollectionReport with this shape:

{
"summary": {},
"coverage": {},
"graph_readiness": {},
"issues": [],
"recommendations": []
}

Summary

FieldMeaning
tool_countNumber of ingested tools
operation_countNumber of OpenAPI operations represented
unique_tool_countTool count after duplicate handling
deprecated_tool_countDeprecated operations found
readiness_scoreDeterministic 0-100 score
statusready, warning, or blocked

Score policy:

  • start at 100
  • subtract 15 for each blocker issue
  • subtract 5 for each warning
  • clamp to 0-100
  • any blocker makes the status blocked
  • warnings or score below 90 make the status warning

Coverage

Coverage explains whether tools have the information needed for search, planning, and execution.

FieldMeaning
request_schema_tool_countTools with request schema information
response_schema_tool_countTools with response schema information
consumes_field_countRequest/path/query/header/body leaves consumed
produces_field_countResponse leaves produced
auth_field_countFields classified as auth
context_field_countFields classified as runtime context
enum_field_countEnum-bearing fields
response_envelope_tool_countTools with response envelope candidates
semantic_action_known_rateTools with non-unknown action
semantic_resource_assigned_rateTools with assigned resource
semantic_module_assigned_rateTools with assigned path/module
observed_contract_coverageContract coverage inferred from tool metadata

Graph Readiness

FieldMeaning
graph_availableA graph was available during analysis
edge_countTotal graph edges
relation_countsEdge counts by relation
producer_edge_countData-flow producer edges
producer_consumer_candidate_countFields that could connect producers to consumers
orphan_tool_countTools with no useful graph connection
isolated_tool_countTools with no in/out edges
edge_quality_summaryEvidence quality counts

Issues

Each issue is stable enough for product UI labels and test assertions.

{
"severity": "warning",
"code": "missing_response_schema",
"tool": "getOrderDetail",
"message": "Operation has no response schema.",
"evidence": {"method": "GET", "path": "/orders/{orderId}"},
"recommendation": "Add a 2xx response schema or repair the contract from source metadata."
}

Common issue codes:

CodeMeaning
missing_request_schemaRequest schema is missing where expected
generic_request_bodyRequest body is too generic for planning
missing_response_schemaResponse schema is missing
duplicate_operation_idMultiple operations use the same operationId
missing_operation_idOperation has no operationId
auth_requiredOpenAPI indicates auth is required
unsupported_content_typeContent type cannot be represented cleanly
array_leaf_alignment_requiredNested array/object leaves need alignment
response_envelope_detectedResponse wrapper/body view candidate detected
low_graph_connectivityGraph has weak producer/consumer connectivity
no_contract_fieldsNo consumes/produces contract fields were extracted
semantic_action_unknown_rate_highToo many tools have unknown action
semantic_resource_unassigned_rate_highToo many tools lack primary resource
weak_edge_evidenceToo many edges are weak or structural-only
module_cluster_too_largeA module cluster is too broad to inspect directly

Recommendations

Recommendations are derived from issue codes. They should be displayed as operator actions, not as hidden logs.

Examples:

  • add or repair missing response schemas
  • provide adapter-specific context/auth field names
  • add resource/action aliases for ambiguous naming conventions
  • split overly large source/module clusters
  • keep execute disabled until auth readiness is configured

Safe Storage

Reports should not contain raw request bodies, response bodies, auth header values, cookies, or user identifiers. If a product adds runtime diagnostics, store only reason codes, header names, and scrubbed evidence.