kickoff_crew
Initiate and manage CrewAI workflows by launching tasks with specific inputs, receiving a crew ID to track task progress using the Model Context Protocol server.
Instructions
Start a new crew task
Args:
inputs: Dictionary containing the query and other input parameters
Returns:
Dictionary containing the crew task response. The response will contain the crew id which needs to be returned to check the status of the crew.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | Yes |
Implementation Reference
- crewai_enterprise_server.py:15-35 (handler)The handler function for the 'kickoff_crew' MCP tool. It is registered via @mcp.tool() decorator and sends a POST request to the CrewAI Enterprise server to start a new crew task, returning the response containing the crew ID.@mcp.tool() async def kickoff_crew(inputs: dict[str, Any]) -> dict[str, Any]: """Start a new crew task Args: inputs: Dictionary containing the query and other input parameters Returns: Dictionary containing the crew task response. The response will contain the crew id which needs to be returned to check the status of the crew. """ async with httpx.AsyncClient() as client: response = await client.post( f"{CREWAI_ENTERPRISE_SERVER_URL}/kickoff", headers={ "Authorization": f"Bearer {CREWAI_ENTERPRISE_BEARER_TOKEN}", "Content-Type": "application/json", }, json={"inputs": inputs}, ) response_json = response.json() return response_json
- crewai_enterprise_server.py:15-15 (registration)The @mcp.tool() decorator registers the kickoff_crew function as an MCP tool.@mcp.tool()
- crewai_enterprise_server.py:17-24 (schema)The docstring provides the input/output schema description for the tool, specifying 'inputs' as dict[str, Any] and return as dict[str, Any]."""Start a new crew task Args: inputs: Dictionary containing the query and other input parameters Returns: Dictionary containing the crew task response. The response will contain the crew id which needs to be returned to check the status of the crew. """