execute_function
Run functions in Foundry datasets with specified parameters to process data and perform operations through natural language commands.
Instructions
Execute a function using given parameters
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query_api_name | Yes | ||
| parameters | Yes |
Implementation Reference
- src/mcp_server_foundry/server.py:130-143 (handler)The handler function for the 'execute_function' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function executes a Foundry ontology query using the provided query_api_name and parameters, accessing the Foundry client from the context.@mcp.tool() def execute_function(query_api_name: str, parameters: dict, ctx: Context): """ Execute a function using given parameters """ foundry_client: FoundryClient = ctx.request_context.lifespan_context.foundry_client ontology_id: str = ctx.request_context.lifespan_context.ontology_id results = foundry_client.ontologies.Query.execute( ontology_id, query_api_name, parameters=parameters ) return results