Tool Reference

get_agent_run_summary

Get execution statistics for an agent instance.

Get execution statistics for an agent instance: total runs, success/failure counts, average duration, and last run timestamp.

Parameters

Parameter Type Required Description
agentInstanceId string Yes The UUID of the agent instance

Example Request

curl -X POST https://socialcrm.com/api/mcp-app \
  -H "Authorization: Bearer sk_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "tools/call",
    "params": {
      "name": "get_agent_run_summary",
      "arguments": {
        "agentInstanceId": "instance_abc123"
      }
    }
  }'

Example Response

Parsed from result.content[0].text:

{
  "totalRuns": 42,
  "successfulRuns": 38,
  "failedRuns": 4,
  "averageDurationMs": 12500,
  "lastRunAt": "2026-03-10T09:15:00.000Z"
}

Output Schema

Field Type Description
totalRuns number Total number of runs for this agent instance
successfulRuns number Runs that completed with status "success"
failedRuns number Runs that completed with status "error"
averageDurationMs number Average run duration in milliseconds (0 if no durations recorded)
lastRunAt string | undefined ISO 8601 timestamp of the most recent run

Notes

  • The agent instance must belong to a brand owned by your company. Requests for instances outside your company will return an error.
  • companyId is auto-injected from your API key — you do not need to pass it.
  • Returns statistics for the most recent 100 runs.