﻿# Handle an OpenRouter assistant message with tool calls and no prose

A tool-only OpenRouter response can be a valid intermediate step; decode structured calls, execute the allowed operation and continue instead of relying only on prose content.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-openrouter-tool-only-response/
Language: en

An assistant message can request a tool without containing user-facing prose. That is a meaningful state in an agent loop, rather than automatically an empty answer failure. An OpenRouter client should inspect the structured message and completion state before deciding whether to display text, execute a tool or report an error.

## Read the message as a structured object

The API reference permits a nullable content field alongside tool_calls in the Chat Completions response shape. Imagine an assistant that needs to look up a document before answering a question. Its next useful output can be a function call rather than an explanatory paragraph. A client that reads only message.content discards the action request. The empty text is therefore insufficient evidence of a failed model call; the rest of the structured response determines what the generation actually produced.

## Give the interface a truthful intermediate state

While the application processes the requested lookup, the user interface can describe that work in a way consistent with the actual executor. It should not invent a finished answer, but it also need not present every valid tool-only message as a blank conversational bubble. This is an application design inference, not a promise of a particular OpenRouter widget. A useful state distinguishes a requested operation, an executing lookup and the eventual answer generated from the returned evidence.

## Execute the call through the client-tools contract

The tool-calling guide describes validating the proposed call, performing the allowed operation and returning its result for another model step. An absent prose field does not relax argument validation or change the scope of the task. For the document example, return the actual search result or failure with the correct call identity. The model can then explain the answer or missing evidence. A successful proposal is only one part of this cycle, separate from a successful external lookup.

## Do not transfer Chat Completions paths blindly

Responses API represents function calls as output items rather than requiring the same message.tool_calls path. A client supporting both interfaces needs endpoint-specific decoding while preserving the common workflow concept. Test a tool-only response, a regular text response and an actual failure in the chosen contract. Streaming also requires assembling the relevant completed structure before executing arguments. These distinctions produce a useful interface because the application understands what work is happening, rather than inferring every state from the presence or absence of a text string.

## Primary sources

- [OpenRouter client tools](https://openrouter.ai/docs/guides/features/tool-calling).

- [OpenRouter API reference](https://openrouter.ai/docs/api-reference/overview).

- [OpenRouter provider selection](https://openrouter.ai/docs/guides/routing/provider-selection).

Related context: [Provider routing](/journal/openrouter-provider-routing/); [Tool-calling integration](/journal/openrouter-tool-calling/).
