Skip to main content
Glama

Send message

send_message
Destructive

Append a user message to an existing Gumloop session and resume the agent; use the message queue instead if the session is busy.

Instructions

Append a user message to an existing session and resume the agent. The session must be idle, completed, failed, or approval_required; sending to a session that is processing or queued returns 409 interaction_not_in_terminal_state. To hand the agent a message while it is still busy, use the message queue instead.

Files uploaded via Upload session file can be attached to the message with attachments.

Sessions waiting on an approval

A session that stopped to ask you something is approval_required, and you have two ways to move it forward:

  • Answer the ask. Send the pending asks' responses to Resolve approvals. Use this to approve or reject a tool call, or to answer an Ask Question the agent raised. This endpoint rejects approval_responses with a 400.

  • Send a follow-up instead. Post a normal message here. It is appended to the session transcript and starts a new turn, leaving the pending ask unanswered. Use this when the answer no longer matters — for example to redirect the agent or drop the request it was asking about.

See Human in the Loop for how agents pause for approvals and questions.

Streaming the response

api.gumloop.com only serves the non-streaming response above. To stream agent output as it's produced, send the same request body (with stream: true) to the streaming host instead:

POST https://ws.gumloop.com/api/v1/sessions/{session_id}/messages

The response is text/event-stream (Server-Sent Events). With the Python SDK, client.sessions.stream_message(session_id, input="...") routes to ws.gumloop.com automatically and yields parsed StreamEvent objects.

If you send stream: true to api.gumloop.com by mistake, the response is a 400 whose body contains the correct streaming host so you can retry against it. Explicit confirmation is required for this exact account operation. Runs can spend credits or trigger downstream actions; never resubmit unknown outcomes automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputNoThe next user message. Required. Also accepted as `message` for backwards compatibility.
streamNoMust be `false` (or omitted) when calling `api.gumloop.com`. Set to `true` only when calling `ws.gumloop.com` (see the streaming section above).
accountNoNamed private Gumloop account; selects private credentials and user/team identity.
confirmNoSet true only when the user asked for exactly this action.
payloadNoComplete JSON request body instead of body flags. Preserves current endpoint fields and values.
session_idYesID of the session to continue.
attachmentsNo
payload_fileNoRegular local JSON body file, at most 5 MB. Cannot be mixed with body flags or payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv3.0.0
    • addedInput schema / $defs / attachments
      Added value: +{
      +  "description": "Files to attach to the message. Each `file_name` must be a stored path returned by Upload session file for this session.",
      +  "items": {
      +    "properties": {
      +      "file_name": {
      +        "description": "Stored path returned by Upload session file.",
      +        "type": "string"
      +      },
      +      "media_type": {
      +        "description": "MIME type of the file.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "file_name"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
    • addedInput schema / properties / attachments / $ref
      Added value: +"#/$defs/attachments"
    • removedInput schema / properties / attachments / description
      Removed value: -"Files to attach to the message. Each `file_name` must be a stored path returned by Upload session file for this session."
    • removedInput schema / properties / attachments / items
      Removed value: -{
      -  "properties": {
      -    "file_name": {
      -      "description": "Stored path returned by Upload session file.",
      -      "type": "string"
      -    },
      -    "media_type": {
      -      "description": "MIME type of the file.",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "required": [
      -    "file_name"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / attachments / maxItems
      Removed value: -10
    • removedInput schema / properties / attachments / type
      Removed value: -"array"
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true for this exact requested account change, agent/flow execution, upload or deletion."New value: +"Set true only when the user asked for exactly this action."
    • addedInput schema / properties / payload / properties / attachments / $ref
      Added value: +"#/$defs/attachments"
    • removedInput schema / properties / payload / properties / attachments / description
      Removed value: -"Files to attach to the message. Each `file_name` must be a stored path returned by Upload session file for this session."
    • removedInput schema / properties / payload / properties / attachments / items
      Removed value: -{
      -  "properties": {
      -    "file_name": {
      -      "description": "Stored path returned by Upload session file.",
      -      "type": "string"
      -    },
      -    "media_type": {
      -      "description": "MIME type of the file.",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "required": [
      -    "file_name"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / payload / properties / attachments / maxItems
      Removed value: -10
    • removedInput schema / properties / payload / properties / attachments / type
      Removed value: -"array"
  2. First observedv2.0.1

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, openWorldHint=true and idempotentHint=false, and the description reinforces and explains them: runs "can spend credits or trigger downstream actions," explicit confirmation is required for this exact account operation, and unknown outcomes must never be resubmitted automatically. It goes further with host-routing behavior (stream:true against api.gumloop.com yields a 400 containing the correct streaming host) that no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded — purpose, preconditions, and the sibling alternative come first, with approval and streaming details in clearly headed sections. However, the streaming subsection (curl example, SDK call, host-mismatch error) is long for a tool description and pushes the confirmation warning to the very end where it is easy to miss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, nested-object, non-idempotent mutation tool with no output schema, the definition covers the state machine, error codes, attachment provenance, streaming host split, and approval interactions. The only minor gap is that the non-streaming response shape is only referred to as "the response above" rather than described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 88%, so the baseline is 3, but the description adds real meaning: attachments must be stored paths returned by Upload session file for this session, and `stream` must be false on api.gumloop.com and true only on ws.gumloop.com. It also implicitly explains `confirm` via the confirmation requirement, though it never enumerates `account`, `payload`, or `payload_file` semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource+effect: "Append a user message to an existing session and resume the agent." It explicitly distinguishes itself from sibling operations by naming the message queue for busy sessions and resolve_session_approvals for pending asks, so an agent can route correctly without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States precise preconditions (session must be idle/completed/failed/approval_required) and the failure mode for the wrong state (409 interaction_not_in_terminal_state). It names the alternative endpoint (message queue) for the busy case and lays out the two competing paths for approval_required sessions, including when a follow-up message is preferable to answering the ask.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools