Skip to main content
Glama

Attach File

attach_file

Attach a ChatGPT file or authorized local file to a Zotero item by item key, optionally targeting a user or group library.

Instructions

Attach a ChatGPT file input or an authorized local file to an item.

Args: item_key: The Zotero item key to attach the file to file: File object supplied by ChatGPT through openai/fileParams file_path: Local server path; stdio only unless HTTP roots are explicitly enabled

Pass both library_id and library_type to target another library; omit both to use the configured default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
item_keyYes
file_pathNo
library_idNo
library_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.0
    • addedInput schema / properties / library_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Library Id"
      +}
    • addedInput schema / properties / library_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "user",
      +        "group"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Library Type"
      +}
  2. First observedv0.9.0

TDQS

B3.4/5.0
Behavior2/5

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

The annotations already indicate it is not read-only and not destructive. The description adds only a technical constraint about file_path (stdio only) and does not disclose other behavioral aspects such as permissions, reversibility, or failure modes. It provides little beyond what annotations convey, so a 2 is appropriate.

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 concise and well-structured, front-loading the main purpose and then breaking down parameters. It is efficient without unnecessary fluff, but a few extra details on usage would not hurt.

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?

Given the tool's moderate complexity, the description covers the essential parameters and targeting rules. An output schema exists, so return values are not required in the description. It is complete enough for an agent to call it correctly, though it could mention what happens on success or failure.

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?

With 0% schema description coverage, the description carries the burden of explaining parameters. It explains item_key, file, file_path, and library_id/library_type with conditions. This is valuable and largely compensates for the schema gap, though it could be more detailed for each parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'attach' and the resource 'file to an item', which is specific and distinguishes it from siblings like list_attachments or download_pdf. However, it does not explicitly name or contrast with any sibling tool, so it earns a 4 rather than a 5.

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

Usage Guidelines3/5

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

The description provides context on when to use the 'file' vs 'file_path' parameters and explains library targeting rules, but it does not explicitly state when to use this tool over alternatives or when not to use it. The guidance is implied but not explicit.

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