Skip to main content
Glama

kb_attachments_import_url

Attach the exact original bytes from a public HTTPS source URL to an existing document. Pass source_url as an ordinary string and the mandatory expected_sha256 independently supplied by the source service; never invent a URL, checksum or substitute file. Optional expected_size_bytes must match exactly. The server validates each redirect, bounds the transfer and verifies integrity before storage. Returns attachment_uuid without changing the document body or revision. To link the file, separately edit the document using label. Active downloadable attachments remain until explicitly archived. Source URLs and checksums are not returned or retained as source metadata. A failed one-use source must be replaced with a fresh source capability before a deliberate retry; the server never replays a failed request. For a chat-host file object use kb_attachments_import; for local bytes use kb_attachments_begin_upload.

Input Schema

NameRequiredDescriptionDefault
filenameYesOriginal filename, at most 255 characters, without path separators or control characters.
source_urlYesOriginal-download HTTPS URL supplied by the source service, not a chat-host file object. Transient; never retained.
document_idYesExisting writable document in the selected workspace.
tenant_slugNoTenant slug to target. Required when your token grants several workspaces; omit when it grants one. If you omit it with several, the refusal names your default workspace; call kb_tenants_list to see every workspace the token grants.
expected_sha256YesRequired independent source checksum. A mismatch is refused before storage; no checksum is returned.
expected_size_bytesNoOptional positive original byte count supplied by the source. Must match the downloaded bytes exactly; the deployment size limit always applies.
include_download_urlNoDefault false. Mint a short-lived (~5 minutes) Brainattic download capability only when needed to fetch the saved original bytes.

Output Schema

NameRequiredDescriptionDefault
attachmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With annotations declaring destructiveHint=false and idempotentHint=false, the description still adds real value: redirect validation, bounded transfer, integrity verification before storage, non-mutation of document body/revision, source URL and checksum not retained, and no server-side replay of failed requests. It avoids contradicting the annotations. It doesn't state the deployment size limit value or concrete failure/error surface, keeping it short of a 5.

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?

Front-loaded with the core action and the integrity constraint, then the linking recipe, then sibling routing — a sensible order. A few clauses (the 'ordinary string' phrasing, the non-retention note restated from the schema) come close to redundancy, but nothing is filler.

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 a 7-parameter, non-idempotent write tool with an output schema present, the description covers what gets mutated (nothing in the body), what is returned (attachment_uuid), what is discarded (source URL/checksum), and the follow-up needed to actually render the file. No gap an agent would trip over.

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 100%, so the baseline is 3; the description earns more by stressing that expected_sha256 must be independently supplied by the source service and never invented, and that expected_size_bytes must match exactly. filename and tenant_slug are left entirely to the schema, so it does not fully exploit the space.

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?

States a specific verb (attach) and resource (exact original bytes from a public HTTPS URL to an existing document), and explicitly distinguishes itself from the two nearest siblings by naming them and their input sources. An agent can route between import_url, import, and begin_upload without opening a schema.

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?

Explicitly names the alternatives and the condition that selects each ('For a chat-host file object use kb_attachments_import; for local bytes use kb_attachments_begin_upload'). It also covers the retry case: a failed one-use source must be replaced with a fresh capability before a deliberate retry.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.