Skip to main content

Artifact Schemas

Collection artifacts are JSON-serializable payloads that store a built tool catalog. They are meant for product adapters that need to persist a graph, display diagnostics, search without rebuilding, and preserve manual operator metadata across rebuilds.

Top-Level Shape

{
"format_version": "1",
"library_version": "0.32.1",
"metadata": {},
"graph": {},
"tools": {},
"readiness_report": {},
"source_snapshot_manifest": [],
"ingest_summary": {},
"edge_stats": {},
"semantic_summary": {},
"edge_quality_summary": {}
}

The artifact remains compatible with ToolGraph.load() because the normal graph payload is still present. Additional fields are additive diagnostics for adapters and UIs.

Sections

SectionPurpose
metadataBuild time, source identity, build options, summary copies
graphSerialized graph nodes and edges
toolsNormalized ToolSchema rows keyed by tool name
readiness_reportDeterministic OpenAPI readiness report
source_snapshot_manifestSource labels, URLs, hashes, and operation counts
ingest_summaryDuplicate handling and operation counts
edge_statsRaw graphify edge extraction stats
semantic_summaryAction/resource/module/result-shape coverage
edge_quality_summaryData-flow, structural, manual, trace, and evidence counts

Product adapters may add fields such as quality_lab or learning. They should preserve unknown fields when repairing contracts or rebuilding the graph.

Metadata

{
"built_at": "2026-07-25T00:00:00+00:00",
"tool_count": 1105,
"source_count": 1,
"source_url": "https://example.com/swagger-ui/index.html",
"spec_urls": ["https://example.com/v3/api-docs"],
"readiness_summary": {"status": "warning", "readiness_score": 86},
"build_options": {
"derive_semantic_metadata": true,
"promote_contract_signals": true,
"context_field_names": ["mallNo", "siteNo"]
}
}

Store product-neutral source facts here. Do not store raw auth tokens, cookies, session ids, or user identifiers.

Tool Row Metadata

OpenAPI-derived tools commonly include:

FieldMeaning
metadata.openapi.methodHTTP method
metadata.openapi.pathOpenAPI operation path
metadata.openapi.operation_idOperation id when available
metadata.openapi.parametersPath/query/header/cookie parameters
metadata.openapi.securityOpenAPI security requirements
metadata.openapi.path_moduleDeterministic module/path cluster
metadata.request_body_schemaRequest body schema summary
metadata.response_schemaResponse schema summary
metadata.content_typesSupported request/response content types
metadata.api_contractConsumes, produces, links, and contract evidence
metadata.ai_metadataDeterministic semantic metadata used by search

ai_metadata may contain canonical_action, primary_resource, one_line_summary, when_to_use, result_shape, semantic_confidence, and semantic_evidence.

Graph Edges

Edges should carry enough evidence to explain why two tools are related.

{
"source": "searchOrders",
"target": "getOrderDetail",
"kind": "data_flow",
"confidence": "extracted",
"conf_score": 0.92,
"evidence": "produces orderId consumed by getOrderDetail",
"evidence_sources": ["api_contract"],
"data_flow": {"field": "orderId"},
"is_manual": false
}

Adapters may merge manual, LLM-curated, OpenAPI link, and run-observed edges through normalize_graph_edge() and merge_graph_edges().

Optional Product Fields

The engine does not require these fields, but product integrations commonly store them with the artifact:

FieldPurpose
quality_lab.casesSearch, plan, and execute validation cases
quality_lab.resultsLast run results and failure reasons
learning.attemptsScrubbed recent execution attempts
learning.suggestionsSuggested or promoted trace-learning evidence
trace_edgesBackward-compatible run-observed edge list

Compatibility Rules

  • Add new fields instead of changing existing field names.
  • Preserve unknown fields during rebuilds.
  • Keep collection_graph_version additive and readable by older adapters where possible.
  • Store raw payloads only outside the artifact, behind product security controls.
  • Scrub any value that looks like a token, cookie, API key, email, phone number, or user identifier before saving learning or trace evidence.