{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.forgeling.io/schemas/events/tool.completed.json",
  "title": "tool.completed",
  "description": "A tool call returned. Opt-in.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "call_index",
    "name",
    "is_error",
    "summary",
    "duration_ms"
  ],
  "properties": {
    "call_index": {
      "type": "integer",
      "minimum": 1,
      "description": "1-based within the turn; pairs tool.started with tool.completed."
    },
    "name": {
      "type": "string"
    },
    "is_error": {
      "type": "boolean"
    },
    "summary": {
      "type": "string",
      "description": "At most 16 KiB. Run secrets are redacted."
    },
    "duration_ms": {
      "type": "integer",
      "minimum": 0
    }
  }
}
