instances
instances ¶
Deterministic Domo instance resolution for the MCP server.
An instance name from a tool call is resolved against a registry by exact slug, alias, then display-name (case-folded). No fuzzy matching: an unknown or ambiguous name raises a structured error listing the candidates so the agent can re-prompt rather than act on the wrong Domo instance.
InstanceResolutionError ¶
InstanceResolutionError(name: str, candidates: list[dict])
Bases: Exception
Raised when an instance name matches zero or multiple registry entries.
Source code in src/crew_dcs/mcp_server/instances.py
27 28 29 30 31 32 33 | |
list_my_domo_instances ¶
list_my_domo_instances(
registry: list[DomoInstance],
) -> list[dict]
Discovery catalog: slug/display_name/aliases only (never tokens).
Source code in src/crew_dcs/mcp_server/instances.py
58 59 60 | |
load_env_registry ¶
load_env_registry() -> list[DomoInstance]
Single-instance registry from DOMO_INSTANCE (standalone mode).
Optionally DOMO_INSTANCES may hold a JSON array of {slug, display_name, aliases} for multi-instance standalone use.
Source code in src/crew_dcs/mcp_server/instances.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
resolve_instance ¶
resolve_instance(
name: str, registry: list[DomoInstance]
) -> DomoInstance
Resolve name to exactly one registry entry (slug > alias > display-name).
Source code in src/crew_dcs/mcp_server/instances.py
43 44 45 46 47 48 49 50 51 52 53 54 55 | |