Skip to main content
Glama

execute

Facilitates actions on Jentic's MCP server by executing specified operations or workflows using provided UUIDs and input parameters.

Instructions

Perform the chosen action for the user using the provided details (if any are needed).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
execution_typeYesSpecify whether to execute an 'operation' or a 'workflow'.
inputsYesThe input parameters required by the operation or workflow.
uuidYesThe UUID of the operation or workflow to execute.

Implementation Reference

  • The primary handler for the 'execute' MCP tool. It validates inputs, constructs an ExecutionRequest, delegates to the Jentic client's execute method, and formats the response with success/error handling and suggested next actions.
    async def execute(self, params: dict[str, Any]) -> dict[str, Any]:
        """MCP endpoint for executing an operation or workflow.
    
        Args:
            params: MCP tool request parameters containing execution_type, uuid, and inputs.
    
        Returns:
            MCP tool response with the execution result.
        """
        logger = logging.getLogger(__name__)
        id = params.get("uuid")
        inputs = params.get("inputs", {})
    
        if not id:
            logger.error(f"Invalid id: {id}")
            return {"result": {"success": False, "message": "Invalid id. Must be 'op_' or 'wf_'."}}
    
        if not isinstance(inputs, dict):
             logger.error(f"Invalid inputs type: {type(inputs)}. Must be a dictionary.")
             return {"result": {"success": False, "message": "Invalid inputs type. Must be a dictionary."}}
    
        logger.info(f"Executing {id} with inputs: {inputs}")
    
        try:
            execution_request = ExecutionRequest(
                id=id,
                inputs=inputs,
            )
            exec_response: ExecuteResponse = await self.jentic.execute(execution_request)
    
            if not exec_response.success:
                return {
                    "result": {
                        "success": False,
                        "message": exec_response.error or "Execution failed.",
                        "output": exec_response.model_dump(exclude_none=True),
                        "suggested_next_actions": self.get_execute_tool_failure_suggested_next_actions(),
                    }
                }
    
            return {
                "result": {
                    "success": True,
                    "output": exec_response.output,
                }
            }
    
        except Exception as e:
            logger.error(f"Error executing {id}: {str(e)}", exc_info=True)
            return {
                        "result": {
                            "success": False,
                            "message": f"Error during execution: {str(e)}",
                            "suggested_next_actions": self.get_execute_tool_failure_suggested_next_actions()
                        }
                    }
  • JSON schema defining the input parameters for the 'execute' tool: execution_type (operation/workflow), uuid, and inputs object.
    EXECUTE_TOOL = {
        "name": "execute",
        "description": "Perform the chosen action for the user using the provided details. Always include `inputs` even if there are none.",
        "parameters": {
            "type": "object",
            "properties": {
                "execution_type": {
                    "type": "string",
                    "enum": ["operation", "workflow"],
                    "description": "Specify whether to execute an 'operation' or a 'workflow'.",
                },
                "uuid": {
                    "type": "string",
                    "description": "The UUID of the operation or workflow to execute.",
                },
                "inputs": {
                    "type": "object",
                    "description": "The input parameters required by the operation or workflow.",
                    "additionalProperties": True, 
                },
            },
            "required": ["execution_type", "uuid", "inputs"],
        },
    }
  • Maps the 'execute' tool name to the MCPAdapter.execute handler method in the central tool dispatch dictionary.
    tool_handlers = {
        "search_apis": mcp_adapter.search_api_capabilities,
        "load_execution_info": mcp_adapter.generate_runtime_config,
        "execute": mcp_adapter.execute,  # Add the execute tool handler
        "submit_feedback": mcp_adapter.submit_feedback
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'perform the chosen action' which implies a write/mutation operation, but doesn't disclose critical behavioral traits: whether this is synchronous/asynchronous, what permissions are required, whether it's idempotent, what happens on failure, or what the response contains. For a tool that appears to execute potentially complex operations/workflows, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point without unnecessary words. However, this conciseness comes at the cost of being under-specified for a tool with three required parameters and no annotations - it could benefit from one more clarifying sentence about what gets executed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 required parameters (including a nested object), no annotations, and no output schema, the description is inadequate. It doesn't explain what types of actions can be executed, what the expected outcomes are, or provide any error handling context. The agent would struggle to use this tool effectively without trial and error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no parameter-specific information beyond the generic 'using the provided details' - it doesn't clarify the relationship between execution_type, uuid, and inputs, or provide examples of valid input objects. Baseline 3 is appropriate when the schema does all the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Perform the chosen action for the user using the provided details' is tautological - it essentially restates the tool name 'execute' without specifying what kind of actions or resources are involved. While it mentions 'chosen action' and 'provided details', it doesn't clarify whether this executes operations, workflows, scripts, or other entities, nor does it distinguish this from sibling tools like 'load_execution_info' or 'search_apis'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance - it mentions 'chosen action' and 'provided details' but gives no explicit when-to-use criteria, no prerequisites, and no comparison to alternatives like 'load_execution_info' (which presumably loads execution information rather than performing execution) or 'search_apis'. The agent must infer usage from the parameter schema alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jentic/jentic-sdks'

If you have feedback or need assistance with the MCP directory API, please join our Discord server