Skip to main content
Glama
Touexe
by Touexe

manage_files

Get file URLs, download files, or upload new files to a record in PocketBase.

Instructions

USE WHEN you need to get a file URL, download a file, or upload a new file to a record.

EXAMPLES:

  • URL: manage_files(action="url", collection="posts", record_id="abc", field="cover", filename="img.jpg")

  • Thumb: manage_files(action="url", ..., thumb="200x200")

  • Download: manage_files(action="download", ..., filename="doc.pdf")

  • Upload: manage_files(action="upload", ..., field="cover", local_path="/tmp/img.jpg", filename="img.jpg")

NEXT STEPS: find_records to see the updated file field after upload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYesField name that holds the file.
thumbNoThumbnail size for image fields, e.g. '100x100'. Only for url action.
actionYesurl: get the file URL; download: fetch file bytes; upload: upload a local file.
filenameNoFilename as stored in the record (required for url/download).
record_idYesRecord id that owns the file.
collectionYesCollection name or id.
local_pathNoAbsolute local path to upload (required for upload action).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of explaining behavior. It discloses action semantics (url/download/upload), notes that thumb applies only to url, and implies uploads persist by suggesting find_records to verify the updated file field. It does not detail side effects or response handling, but the output schema exists to cover return values.

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?

The description is front-loaded with the primary use statement, followed by concise examples and a single next-step note. It is slightly longer than necessary but every sentence adds practical value, especially the examples that clarify parameter combinations.

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

Completeness4/5

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

For a 7-parameter, three-action tool, the description plus fully documented schema and output schema provide enough to call the tool correctly. It covers all actions, action-specific parameter requirements, and a follow-up step. It omits edge cases like upload overwrite behavior, but that is not essential for correct invocation.

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?

The schema already covers all parameters with 100% description coverage, so the baseline is 3. The description adds meaningful action-specific guidance: filename is required for url/download, local_path is required for upload, and thumb only applies to url. This goes beyond the schema by clarifying conditional requirements.

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?

The description opens with a specific 'USE WHEN' statement listing three concrete operations: get a file URL, download a file, or upload a file. It is clearly distinct from sibling tools like find_records or write_record because it is scoped to file-related operations on records.

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

Usage Guidelines4/5

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

The 'USE WHEN' statement gives explicit contexts for invoking the tool. It does not name alternatives or exclusion criteria, but the examples clearly map actions to use cases, making the intended usage unambiguous.

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