> ## 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.

# Company knowledge

> Search documents, read pages and records, and make versioned updates to the knowledge your company can use.

<Info>Melso Agents is available only internally or by private invitation. Agents-specific features require existing access. For the autónomo fiscal service, see [Get started](/essentials/quickstart).</Info>

The company **Library** holds documents and table records, exposed through the `knowledge` tools. Every call respects the
company and Area permissions of its actor. A Task Run stays within Company
context and its current Area; an isolated Run cannot access the Library.

Use [`knowledge_search`](/mcp/tools/knowledge-search) to find relevant pages,
[`knowledge_get`](/mcp/tools/knowledge-get) to read them, and
[`knowledge_write`](/mcp/tools/knowledge-write) to update them. For an update,
read the current version and supply a request ID and `expected_revision`.

## Update a page with its current version

These are `tools/call` parameters for core tools. Replace the page ID with one
returned by your permitted search. First read the page:

```json theme={null}
{
  "name": "knowledge_get",
  "arguments": {
    "ids": ["11111111-1111-4111-8111-111111111111"]
  }
}
```

Check the result before writing. If the returned `revision` is `7`, a title
update uses that value as `expected_revision` and a new request UUID:

```json theme={null}
{
  "name": "knowledge_write",
  "arguments": {
    "request_id": "22222222-2222-4222-8222-222222222222",
    "items": [{
      "action": "update",
      "page_id": "11111111-1111-4111-8111-111111111111",
      "expected_revision": 7,
      "title": "Reviewed project brief"
    }]
  }
}
```

This changes the saved title. Use the version you actually read, not the
illustrative `7`. Reuse the request ID only for an identical retry. If the
version conflicts, read again and review the intervening change before issuing
a new update with a new request ID.

## Advanced operations

Discover schemas, views, history, archive, delete, and file operations with
`tools_search`. Call the returned tool through `tools_call` using its schema.
Saved filters narrow a result; they do not grant access.

Deleting pages is a restorable soft delete. Confirm the exact pages and any
cascade before requesting it. Linked pages keep their link text, so inspect
the returned inbound links when cleaning up.

<CardGroup cols={2}>
  <Card title="Knowledge tools" icon="book" href="/mcp/tools/knowledge-search">Start with a permitted search.</Card>
  <Card title="Artifacts" icon="file" href="/concepts/artifacts">Deliver files and apps with explicit access.</Card>
</CardGroup>


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