> ## Documentation Index
> Fetch the complete documentation index at: https://docs.melso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Melso product MCP: https://melso.ai/api/mcp (OAuth; one company per grant). REST: https://melso.ai. Documentation-search MCP: https://docs.melso.ai/mcp. The docs search server does not act on customer accounts.
>
> Use the live tool schema and respect company membership. Ask the person to authorize the exact fiscal document version in the signed-in app. A professional prepares and files included returns after authorization; AI does not file alone. A prepared file or approval receipt is not evidence of filing. Never claim completion from an accepted Task or Run. Keep credentials out of chat and logs. Agents features are internal or by private invitation.

# Read MCP results

> Handle structured results, tool errors, streaming and asynchronous work.

MCP uses JSON-RPC. A successful HTTP exchange can still contain a JSON-RPC error or a tool result with `isError: true`.

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [{ "type": "text", "text": "{\"tasks\":[],\"total\":0}" }],
    "structuredContent": { "tasks": [], "total": 0 }
  }
}
```

This illustrates an empty Task list. Prefer `structuredContent` when supplied; otherwise parse the JSON text content for tools that return JSON. Do not assume every connected-app tool has the same payload shape. Check the live catalog for `outputSchema`; the built-in tools documented here do not declare one.

## Accepted work can still be running

`tasks_create` returns a Task and an execution receipt. `tasks_send` returns a message receipt, which can be queued or saved without starting a Run. Follow the Task’s Runs and read the completed Run’s assistant message.

For a wait, advertise `Accept: application/json, text/event-stream`. The [`tasks_wait` contract](/mcp/tools/tasks-wait) defaults to a 600-second observation window with streaming, or 20 seconds for JSON-only requests; these are also the respective maximums. Set `timeout_seconds: 0` for an immediate snapshot. A timeout ends the observation window without marking the Task failed or complete. Read the Task and its Run, or wait again, to learn the outcome.

## Discover before calling

Call core tools directly. To use an advanced tool:

1. Call `tools_search` with its name or your intended task.
2. Read the returned input schema and availability.
3. Call `tools_call` with that exact name and validated arguments.
4. Check the result’s error state and receipt before reporting an outcome.

Connected-app catalogs are dynamic. Reuse neither an invented tool name nor a schema from another account.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.