get_metrics_catalog
Access the catalog of available metrics for time-series API calls within Fulcra Context MCP, enabling precise data retrieval for health, location, and other stored contextual information.
Instructions
Get the catalog of available metrics that can be used in time-series API calls
(metric_time_series and metric_samples).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- fulcra_mcp/main.py:315-322 (handler)The primary handler function for the 'get_metrics_catalog' MCP tool. It is decorated with @mcp.tool() for registration and FastMCP inference of schema (no input params). Retrieves the metrics catalog via FulcraAPI.metrics_catalog() and returns it as prefixed JSON string.@mcp.tool() async def get_metrics_catalog() -> str: """Get the catalog of available metrics that can be used in time-series API calls (`metric_time_series` and `metric_samples`). """ fulcra = get_fulcra_object() catalog = fulcra.metrics_catalog() return "Available metrics: " + json.dumps(catalog)
- fulcra_mcp/main.py:278-297 (helper)Shared helper function used by the get_metrics_catalog handler (and all other tools) to obtain an authenticated FulcraAPI instance.def get_fulcra_object() -> FulcraAPI: global stdio_fulcra if settings.fulcra_environment == "stdio": if stdio_fulcra is not None: return stdio_fulcra else: stdio_fulcra = FulcraAPI() stdio_fulcra.authorize() return stdio_fulcra mcp_access_token = get_access_token() if not mcp_access_token: raise HTTPException(401, "Not authenticated") fulcra_token = oauth_provider.token_mapping.get(mcp_access_token.token) if fulcra_token is None: raise HTTPException(401, "Not authenticated") fulcra = FulcraAPI() fulcra.set_cached_access_token(fulcra_token) return fulcra