# AgentFlight MCP Streamable Gateway API

Get AgentFlight MCP Streamable Gateway data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Codesphereug, pass parameters such as id, jsonrpc, method, and retrieve structured data including identifier, name, returned annotations field, description, and returned input schema field for application integration and result review, and integration reference.

Documentation: https://openany.si/market/apis/gateway/agentflight-mcp-streamable-gateway/
API ID: 35d1bb22-114b-4588-87fc-683099b08d9c
Provider: codesphereug
Contract revision: 7
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/codesphereug/mcp
Page update time: 2026-12-03T02:49:49.875Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.001 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:49:49.875Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "1000",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AgentFlight MCP Streamable Gateway API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "jsonrpc": {
      "type": "string"
    },
    "result": {
      "type": "object",
      "properties": {
        "tools": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "annotations": {
                "type": "object",
                "properties": {
                  "destructiveHint": {
                    "type": "boolean"
                  },
                  "idempotentHint": {
                    "type": "boolean"
                  },
                  "openWorldHint": {
                    "type": "boolean"
                  },
                  "readOnlyHint": {
                    "type": "boolean"
                  }
                }
              },
              "description": {
                "type": "string"
              },
              "inputSchema": {
                "type": "object",
                "properties": {
                  "properties": {
                    "type": "object",
                    "properties": {
                      "tools": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            }
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "compact": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "cassette_json": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "max_cost_ceiling_usd": {
                        "type": "object",
                        "properties": {
                          "default": {
                            "type": "number"
                          },
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "actor": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "input_payload": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "mode": {
                        "type": "object",
                        "properties": {
                          "default": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "enum": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "contract": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "type": {
                    "type": "string"
                  }
                }
              },
              "name": {
                "type": "string"
              },
              "outputSchema": {
                "type": "object",
                "properties": {
                  "properties": {
                    "type": "object",
                    "properties": {
                      "passed": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "score": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "violations": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "items": {
                            "type": "object",
                            "properties": {
                              "properties": {
                                "type": "object",
                                "properties": {
                                  "message": {
                                    "type": "object",
                                    "properties": {
                                      "description": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "rule_id": {
                                    "type": "object",
                                    "properties": {
                                      "description": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "severity": {
                                    "type": "object",
                                    "properties": {
                                      "description": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "tool_name": {
                                    "type": "object",
                                    "properties": {
                                      "description": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              },
                              "type": {
                                "type": "string"
                              }
                            }
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "hardened_tools": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            }
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "post_lint_score": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "smells_resolved": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "tools_optimized": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "is_hash_chain_valid": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "markdown_report": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "root_cause": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "severity": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "summary": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "violation_count": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "failed_rules": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "passed_rules": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "results": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            }
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      },
                      "total_rules": {
                        "type": "object",
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Recorded upstream MCP tools/list (HTTP 200)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/codesphereug/mcp' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "id": 2,
  "jsonrpc": "2.0",
  "method": "tools/list"
}'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "id": 2,
  "jsonrpc": "2.0",
  "result": {
    "tools": [
      {
        "annotations": {
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false,
          "readOnlyHint": true
        },
        "description": "Statically inspect MCP tool schema definitions against 10 ergonomics rules (TS001-TS010) and calculate an Agent Ergonomics Score.\n\n### Purpose\nEvaluates Model Context Protocol tool schemas for anti-patterns that confuse LLM tool-calling (tautological descriptions, missing required arrays, ambiguous parameter types, unconstrained inputs, and lack of usage boundaries). Produces an ergonomics score (0-100) and actionable remediation steps.\n\n### When to use\n- Auditing and validating MCP tool definitions during development or CI/CD pre-commit hooks.\n- Benchmarking tool schema clarity and LLM tool selection readiness before deployment.\n\n### When NOT to use\n- Do NOT use to evaluate runtime agent trajectory recordings; use `agentflight_diff_cassettes` or `agentflight_verify_cassette` instead.\n\n### Behavior & Side Effects\n- Read-only: Operates purely in-memory; does not mutate any schemas or files.\n- Deterministic: Analyzes schemas through static AST and JSON Schema inspection with zero external network calls.",
        "inputSchema": {
          "properties": {
            "tools": {
              "description": "List of MCP tool definition objects containing name, description, and inputSchema to be statically analyzed.",
              "items": {
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "tools"
          ],
          "type": "object"
        },
        "name": "agentflight_lint_tools",
        "outputSchema": {
          "properties": {
            "passed": {
              "description": "True if score meets or exceeds the passing threshold (>= 80).",
              "type": "boolean"
            },
            "score": {
              "description": "Agent Ergonomics Score from 0 to 100.",
              "type": "number"
            },
            "violations": {
              "description": "List of detected tool smell violations across rules TS001 through TS010.",
              "items": {
                "properties": {
                  "message": {
                    "description": "Diagnosis and guidance on fixing the smell.",
                    "type": "string"
                  },
                  "rule_id": {
                    "description": "Ergonomics rule code (e.g. TS001).",
                    "type": "string"
                  },
                  "severity": {
                    "description": "Severity grade (error, warning, info).",
                    "type": "string"
                  },
                  "tool_name": {
                    "description": "Violating tool name.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "score",
            "passed",
            "violations"
          ],
          "type": "object"
        }
      },
      {
        "annotations": {
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false,
          "readOnlyHint": true
        },
        "description": "Automatically refactor flawed MCP tool JSON schemas into hardened, Glama/AgentFlight Gold Standard definitions.\n\n### Purpose\nApplies deterministic remediation transformations via `ToolSchemaOptimizer` to fix `TS001`-`TS010` ergonomics smells, inferring parameter types, adding explicit constraints, marking required arrays, and upgrading descriptions with Purpose, When to use, and Behavior sections.\n\n### When to use\n- Automatically fixing low Agent Ergonomics Scores reported by `agentflight_lint_tools` before publishing an MCP server.\n- Enforcing typed JSON schemas and bounded enums across legacy tool wrappers.\n\n### When NOT to use\n- Do NOT use when you only need a non-mutating lint audit without generating refactored schemas; use `agentflight_lint_tools` instead.\n\n### Behavior & Side Effects\n- Read-only: Transforms schemas purely in memory and returns hardened copies without modifying disk files.\n- Deterministic & Idempotent: Running optimization multiple times converges cleanly.",
        "inputSchema": {
          "properties": {
            "compact": {
              "description": "Strip display-only schema metadata ('title', verbose boilerplate, nullable anyOf wrappers) to cut per-turn tokens.",
              "type": "boolean"
            },
            "tools": {
              "description": "Array of raw MCP tool schema objects containing name, description, and inputSchema.",
              "items": {
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "tools"
          ],
          "type": "object"
        },
        "name": "agentflight_optimize_tools",
        "outputSchema": {
          "properties": {
            "hardened_tools": {
              "description": "Refactored MCP tool schemas conforming to TS001-TS010 standards.",
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            "post_lint_score": {
              "description": "Agent Ergonomics Score (0-100) after optimization.",
              "type": "number"
            },
            "smells_resolved": {
              "description": "Total tool-smell findings resolved across all schemas.",
              "type": "integer"
            },
            "tools_optimized": {
              "description": "Count of MCP tools processed.",
              "type": "integer"
            }
          },
          "required": [
            "tools_optimized",
            "smells_resolved",
            "hardened_tools",
            "post_lint_score"
          ],
          "type": "object"
        }
      },
      {
        "annotations": {
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false,
          "readOnlyHint": true
        },
        "description": "Run automated NTSB/AAIB-grade Flight Data Recorder incident analysis on a recorded agent trajectory.\n\n### Purpose\nInspects a recorded `.flight.json` cassette (inline `cassette_json` or local `cassette_path`) to classify incident severity, isolate fault inception step, trace state-mutating blast radius, and produce actionable remediation steps.\n\n### When to use\n- Diagnosing why a production or staging AI agent looped, exhausted budget, spiked in latency, or crashed mid-run.\n- Generating structured Markdown or JSON post-mortem reports for engineering incidents.\n\n### When NOT to use\n- Do NOT use to check two trajectories side-by-side; use `agentflight_diff_cassettes` instead.\n\n### Behavior & Side Effects\n- Read-only: Parses telemetry spans in memory and leaves source cassettes completely untouched.\n- Deterministic: Identical cassettes yield identical root-cause classifications and fault steps.",
        "inputSchema": {
          "properties": {
            "cassette_json": {
              "description": "Inline cassette JSON object containing agent_id, head_hash, and spans to investigate.",
              "type": "object"
            },
            "max_cost_ceiling_usd": {
              "default": 2.0,
              "description": "Optional USD budget ceiling used to classify budget exhaustion incidents (default 2.0).",
              "type": "number"
            }
          },
          "type": "object"
        },
        "name": "agentflight_post_mortem",
        "outputSchema": {
          "properties": {
            "is_hash_chain_valid": {
              "description": "True if SHA-256 chain integrity succeeded.",
              "type": "boolean"
            },
            "markdown_report": {
              "description": "Full Markdown post-mortem report.",
              "type": "string"
            },
            "root_cause": {
              "description": "Classified root cause category.",
              "type": "string"
            },
            "severity": {
              "description": "Incident severity (CRITICAL, HIGH, MEDIUM, LOW, CLEAN).",
              "type": "string"
            },
            "summary": {
              "description": "Concise narrative of what failed and where.",
              "type": "string"
            }
          },
          "required": [
            "severity",
            "root_cause",
            "is_hash_chain_valid",
            "summary",
            "markdown_report"
          ],
          "type": "object"
        }
      },
      {
        "annotations": {
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false,
          "readOnlyHint": true
        },
        "description": "Audit an agent trajectory cassette or candidate tool call against the AgentFlight Runtime Policy Firewall (PF001-PF007).\n\n### Purpose\nEnforces deterministic security guardrails checking for SSRF private/metadata URLs, path traversal, destructive SQL, live secret exfiltration, unauthorized actors, and per-flight mutation caps.\n\n### When to use\n- Pre-screening a live candidate tool call (`actor` + `input_payload`) before executing side effects.\n- Auditing an entire recorded flight cassette (`cassette_json` or `cassette_path`) under `standard`, `strict`, or `read-only` policy modes.\n\n### When NOT to use\n- Do NOT use to validate static MCP tool schema syntax; use `agentflight_lint_tools` instead.\n\n### Behavior & Side Effects\n- Read-only: Evaluates rules deterministically in memory without mutating state or calling networks.",
        "inputSchema": {
          "properties": {
            "actor": {
              "description": "Candidate tool or MCP actor name when auditing a single tool call.",
              "type": "string"
            },
            "cassette_json": {
              "description": "Inline cassette JSON object containing spans to audit across the full flight.",
              "type": "object"
            },
            "input_payload": {
              "description": "Candidate argument dictionary paired with `actor` for single-call preflight evaluation.",
              "type": "object"
            },
            "mode": {
              "default": "standard",
              "description": "Firewall enforcement profile.",
              "enum": [
                "standard",
                "strict",
                "read-only"
              ],
              "type": "string"
            }
          },
          "type": "object"
        },
        "name": "agentflight_audit_policy",
        "outputSchema": {
          "properties": {
            "passed": {
              "description": "True if zero blocking policy violations were detected.",
              "type": "boolean"
            },
            "violation_count": {
              "description": "Total policy violations found.",
              "type": "integer"
            },
            "violations": {
              "description": "List of PF001-PF007 policy findings with rule_id, severity, step_index, and message.",
              "items": {
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "passed",
            "violation_count",
            "violations"
          ],
          "type": "object"
        }
      },
      {
        "annotations": {
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false,
          "readOnlyHint": true
        },
        "description": "Evaluate a declarative FlightContract behavioral specification against a recorded AI agent trajectory.\n\n### Purpose\nChecks recorded trajectories against formal SLAs and invariants including required tool calls (`must_call`), forbidden tools (`must_not_call`), ordered tool sequences (`must_follow_order`), step/cost/token/latency ceilings, zero-error tolerance, and SHA-256 integrity.\n\n### When to use\n- Running deterministic behavioral regression gates on recorded cassettes in CI or post-deployment checks.\n- Validating that an agent obeyed cost budgets and required workflow ordering.\n\n### When NOT to use\n- Do NOT use to compare two cassettes without an explicit contract; use `agentflight_diff_cassettes` instead.\n\n### Behavior & Side Effects\n- Read-only: Evaluates the supplied `contract` against cassette spans purely in memory.",
        "inputSchema": {
          "properties": {
            "cassette_json": {
              "description": "Inline cassette JSON object to evaluate against the behavioral contract.",
              "type": "object"
            },
            "contract": {
              "description": "FlightContract specification object (name, must_call, must_not_call, must_follow_order, max_cost_usd, max_steps, max_tokens, max_error_rate).",
              "type": "object"
            }
          },
          "required": [
            "contract"
          ],
          "type": "object"
        },
        "name": "agentflight_evaluate_contract",
        "outputSchema": {
          "properties": {
            "failed_rules": {
              "description": "Count of rules failing.",
              "type": "integer"
            },
            "passed": {
              "description": "True if all contract rules passed.",
              "type": "boolean"
            },
            "passed_rules": {
              "description": "Count of rules passing.",
              "type": "integer"
            },
            "results": {
              "description": "Per-rule pass/fail breakdown with expected vs actual evidence.",
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            "score": {
              "description": "Percentage score (0-100) across contract rules.",
              "type": "number"
            },
            "total_rules": {
              "description": "Number of rules evaluated.",
              "type": "integer"
            }
          },
          "required": [
            "passed",
            "score",
            "total_rules",
            "passed_rules",
            "failed_rules",
            "results"
          ],
          "type": "object"
        }
      }
    ]
  }
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
