get_stream_schema
Retrieve schema details for a specific data stream to understand its structure and available fields.
Instructions
Get schema information for a specific stream. Increase fields_limit to inspect more fields from large schemas.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stream_name | Yes | ||
| fields_limit | No | ||
| include_raw | No |
Implementation Reference
- openobserve_mcp/server.py:75-89 (handler)MCP tool handler for get_stream_schema which calls the OpenObserve client to fetch the schema.
def get_stream_schema( stream_name: str, fields_limit: int = 100, include_raw: bool = False, ) -> dict[str, Any]: """Get schema information for a specific stream. Increase fields_limit to inspect more fields from large schemas.""" client = client_provider.get() raw = client.get_stream_schema(stream_name=stream_name) return build_stream_schema_result( org_id=client.resolve_org_id(), stream_name=stream_name, raw=raw, fields_limit=fields_limit, include_raw=include_raw, ) - Low-level API client method to fetch the schema of a stream.
def get_stream_schema(self, *, stream_name: str) -> Any: return self.request_json( "GET", self._org_path("/api/{org_id}/streams/{stream_name}/schema", stream_name=stream_name), )