list_dashboards
Retrieve dashboards in your OpenObserve organization. Use filters like folder, title, page size, or include raw data to find and manage monitoring dashboards.
Instructions
List dashboards in the current organization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | ||
| title | No | ||
| page_size | No | ||
| include_raw | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- openobserve_mcp/server.py:223-237 (handler)The MCP tool handler function `list_dashboards` decorated with @server.tool(). It accepts optional folder, title, page_size, and include_raw parameters, calls the client's list_dashboards method, and formats the result via build_list_dashboards_result.
@server.tool() def list_dashboards( folder: str | None = None, title: str | None = None, page_size: int | None = None, include_raw: bool = False, ) -> dict[str, Any]: """List dashboards in the current organization.""" client = client_provider.get() raw = client.list_dashboards(folder=folder, title=title, page_size=page_size) return build_list_dashboards_result( org_id=client.resolve_org_id(), raw=raw, include_raw=include_raw, ) - openobserve_mcp/server.py:225-229 (schema)The schema/parameters for the tool: folder (optional str), title (optional str), page_size (optional int), include_raw (optional bool, default False).
folder: str | None = None, title: str | None = None, page_size: int | None = None, include_raw: bool = False, ) -> dict[str, Any]: - The HTTP client method `list_dashboards` that sends a GET request to /api/{org_id}/dashboards with optional query params (folder, title, pageSize).
def list_dashboards( self, *, folder: str | None = None, title: str | None = None, page_size: int | None = None, ) -> Any: query: dict[str, str | int | float | bool] = {} if folder: query["folder"] = folder if title: query["title"] = title if page_size is not None: query["pageSize"] = page_size return self.request_json( "GET", self._org_path("/api/{org_id}/dashboards"), query=query or None, ) - The output builder `build_list_dashboards_result` that shapes the raw API response into a compact result dict with org_id, count, and dashboards list.
def build_list_dashboards_result( *, org_id: str, raw: Any, include_raw: bool, ) -> dict[str, Any]: items = raw.get("dashboards", []) if isinstance(raw, dict) else [] result: dict[str, Any] = { "org_id": org_id, "count": len(items), "dashboards": items, } return maybe_include_raw(result, raw, include_raw) - openobserve_mcp/server.py:223-237 (registration)The tool is registered via the @server.tool() decorator on the `list_dashboards` function inside `create_server()`.
@server.tool() def list_dashboards( folder: str | None = None, title: str | None = None, page_size: int | None = None, include_raw: bool = False, ) -> dict[str, Any]: """List dashboards in the current organization.""" client = client_provider.get() raw = client.list_dashboards(folder=folder, title=title, page_size=page_size) return build_list_dashboards_result( org_id=client.resolve_org_id(), raw=raw, include_raw=include_raw, )