Tool Details: agent_fail_task

Basic Information

Tool Name:agent_fail_task
Asset Name:Fail Agent Task
Description:Explicitly marks the in-scope task as failed. Invoked by an agent transition (typically as an LLM tool call) to surface a non-recoverable error to the caller. The agentId and taskId are read from the request context — the framework populates them when dispatching a task transition. Without a task in scope the call fails. Side effects: fails the pending task Job with the supplied error message and removes the task from the agent's task queue.
Adapter:agent
Asset Hash:0x9531eac7e94eb72596b192848a5df02ee7a88f581cc3625d12e2ea4573f65d22
Input
PropertyTypeDescription
error*stringHuman-readable error message describing why the task failed.
Output
PropertyTypeDescription
agentIdstring-
taskIdstring-
statusstringAlways 'FAILED'.

MCP Tool Usage Examples

This tool can be called via the MCP (Model Context Protocol) endpoint. Here are examples of how to use it:

JSON-RPC Call Example:

POST to https://venue-3.covia.ai/mcp

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "agent_fail_task",
    "arguments": {
      "input": "your input here"
    }
  }
}
cURL Example:
curl -X POST https://venue-3.covia.ai/mcp \\
  -H "Content-Type: application/json" \\
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "agent_fail_task",
      "arguments": {
        "input": "your input here"
      }
    }
  }'
Python Example:
import requests
import json

url = "https://venue-3.covia.ai/mcp"
payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "agent_fail_task",
        "arguments": {
            "input": "your input here"
        }
    }
}

response = requests.post(url, json=payload)
result = response.json()
print(result)
JavaScript/Node.js Example:
const fetch = require('node-fetch');

const url = 'https://venue-3.covia.ai/mcp';
const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'tools/call',
    params: {
        name: 'agent_fail_task',
        arguments: {
            input: 'your input here'
        }
    }
};

fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data));

Asset Metadata

{
    "name": "Fail Agent Task",
    "description": "Explicitly marks the in-scope task as failed. Invoked by an agent transition (typically as an LLM tool call) to surface a non-recoverable error to the caller. The agentId and taskId are read from the request context — the framework populates them when dispatching a task transition. Without a task in scope the call fails. Side effects: fails the pending task Job with the supplied error message and removes the task from the agent's task queue.",
    "dateCreated": "2026-04-16T00:00:00Z",
    "operation": {
        "adapter": "agent:failTask",
        "toolName": "agent_fail_task",
        "input": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "description": "Human-readable error message describing why the task failed."
                }
            },
            "required": ["error"]
        },
        "output": {
            "type": "object",
            "properties": {
                "agentId": { "type": "string" },
                "taskId":  { "type": "string" },
                "status":  { "type": "string", "description": "Always 'FAILED'." }
            }
        }
    }
}

Navigation

Back to adapter details

Back to all adapters

Back to index