utils
create_agent_table(agents, agent_dict=None)
Create a Gradio Dataframe component for agent configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agents
|
List[AgentConfig]
|
List of agent configurations |
required |
agent_dict
|
dict | None
|
An optional mapping from agent name to MCP server tool data
produced by |
None
|
Returns:
| Type | Description |
|---|---|
Dataframe
|
The configured Gradio Dataframe component representing agents |
Source code in src/mada/interfaces/gradio/utils.py
cycle_through_tools(agents, sim_server=None, return_tool=False)
Build a mapping of agents to MCP servers and their available tool names.
Iterates through each agent, inspects its configured MCP tools, and
collects the function names exposed by each MCP server. Optionally,
the function can search for and return a specific tool function named
in_situ_viz from the specified simulation server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agents
|
List[AgentConfig]
|
List of agent configurations |
required |
sim_server
|
str | None
|
The name of the MCP server to inspect when |
None
|
return_tool
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
Any
|
If { agent_name: { mcp_server_name: [tool_name, ...] } } |
Any
|
If |
Any
|
|
Any
|
function is found. |