curl --request POST \
--url https://api.agent-corex.com/v1/execute_tool \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tool_name": "create-pull-request",
"params": {
"repository": "owner/repo",
"title": "Add new feature",
"from_branch": "feature/x",
"to_branch": "main",
"body": "This PR adds a new feature"
}
}
'{
"success": true,
"data": {
"tool_name": "create-pull-request",
"status": "success",
"result": {
"pr_number": 123,
"pr_url": "https://github.com/owner/repo/pull/123",
"created_at": "2024-01-15T10:30:00Z"
},
"execution_time_ms": 245,
"tokens_used": {
"input": 150,
"output": 200
}
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "TOOL_NOT_FOUND",
"message": "Tool 'create-pull-request' not found or not connected"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Tools
Execute a tool
Execute a tool with specified parameters. Returns the result of the tool execution. The tool must be available (connected via MCP server) and you must have proper authentication.
POST
/
execute_tool
curl --request POST \
--url https://api.agent-corex.com/v1/execute_tool \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tool_name": "create-pull-request",
"params": {
"repository": "owner/repo",
"title": "Add new feature",
"from_branch": "feature/x",
"to_branch": "main",
"body": "This PR adds a new feature"
}
}
'{
"success": true,
"data": {
"tool_name": "create-pull-request",
"status": "success",
"result": {
"pr_number": 123,
"pr_url": "https://github.com/owner/repo/pull/123",
"created_at": "2024-01-15T10:30:00Z"
},
"execution_time_ms": 245,
"tokens_used": {
"input": 150,
"output": 200
}
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "TOOL_NOT_FOUND",
"message": "Tool 'create-pull-request' not found or not connected"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
bearerAuthapiKey
JWT token obtained from dashboard
Body
application/json