Skip to main content
Glama

attach_media_to_record

Attach a file from the MyFile library to a field of type file or image of a specific record. Use it for attached_files instead of update_record when the field is of type file/image.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "app_id": "<app_id>",
      "entity_id": "<entity_id>",
      "record_id": "<record_id>",
      "field_id": "<field_id>",
      "my_file_id": "<my_file_id>"
    },
    "name": "attach_media_to_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
app_idYesProject ID (from list_projects)
field_idYesID of a field of type file or image
entity_idYesForm ID
record_idYesRecord ID
my_file_idYesmedia_id of the attached MyFile

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / entity_id / description
      Previous value: -"ID форми"New value: +"Form ID"
    • changedInput schema / properties / field_id / description
      Previous value: -"ID поля типу file або image"New value: +"ID of a field of type file or image"
    • changedInput schema / properties / my_file_id / description
      Previous value: -"media_id прикріпленого MyFile"New value: +"media_id of the attached MyFile"
    • changedInput schema / properties / record_id / description
      Previous value: -"ID запису"New value: +"Record ID"
  2. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent behavior. The description adds the useful constraint that the target field must be of type file/image, but does not say whether attaching replaces existing media, requires specific permissions, or how repeated calls behave beyond the non-idempotent annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action and resource, and the second sentence delivers the key routing rule. No wasted words.

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 fully specified 5-parameter mutation tool with annotations and a complete schema, the description gives enough context to invoke it correctly. The remaining gaps are modest: handling of existing media and differentiation from upload_file_to_record.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all five parameters are documented in the schema itself. The description adds no parameter-level detail beyond the field-type constraint, so baseline 3 is appropriate.

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 states a specific verb (attach), resource (file from MyFile library), target (file/image field of a record), and explicitly contrasts with update_record. An agent can identify the operation without reading the schema.

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?

It gives explicit routing guidance against update_record for file/image fields, which is valuable. However, it omits the closest sibling, upload_file_to_record, leaving ambiguity about when to use that tool instead of this one.

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.

Resources