Skip to main content
Glama

file_create

Create a new versioned shared file in the caller's org.

Shared files default to private. Call file_publish to generate the public share URL (/s/{share_token}). Each file_update creates a new immutable version row. Pass work_id to attach it to a task and/or project_id to attach it to a project (same shared_files row; project attachments are kind=artifact only).

content_format='diagram' takes either diagram schema:

  • teamshared.diagram/v1 — body: {format: mermaid, text: "..."}, rendered as Mermaid. Best for flowcharts, sequences, and ER sketches.

  • teamshared.diagram/v2 — body: {format: scene, layers: [...], nodes: [...], edges: [...]}, rendered as a layered 3D scene where each layer is a plane (infra / software / data by convention), each node sits on one layer, and edges may cross layers. kind (default system), view (layers), mode (authored) and body.camera are optional. Every node needs id and layer; shape is box | cylinder | sphere | cone; edges are {from, to, label?, kind?} with kind one of sync | async | data | depends. Omit x/z to get an automatic grid on the plane. Caps: 8 layers, 300 nodes, 600 edges, 256 KiB. Unknown keys are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNoOverride agent identity
titleYesFile title
contentYesFile body: markdown, raw HTML, a diagram document JSON/YAML when content_format='diagram', or teamshared.sheet/v1 JSON/YAML when content_format='sheet' (stored as JSON)
work_idNoAttach the new file to this work item UUID
project_idNoAttach the new file to this project UUID (kind=artifact)
content_formatNo'markdown' (allowlist sanitizer), 'html' (sanitized raw HTML), 'diagram' (teamshared.diagram/v1 Mermaid or teamshared.diagram/v2 layered 3D scene, JSON/YAML), or 'sheet' (teamshared.sheet/v1 JSON/YAML; typed grid, stored as JSON)markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / content / description
      Previous value: -"File body: markdown, raw HTML, teamshared.diagram/v1 JSON/YAML when content_format='diagram', or teamshared.sheet/v1 JSON/YAML when content_format='sheet' (stored as JSON)"New value: +"File body: markdown, raw HTML, a diagram document JSON/YAML when content_format='diagram', or teamshared.sheet/v1 JSON/YAML when content_format='sheet' (stored as JSON)"
    • changedInput schema / properties / content_format / description
      Previous value: -"'markdown' (allowlist sanitizer), 'html' (sanitized raw HTML), 'diagram' (teamshared.diagram/v1 JSON/YAML; Mermaid on /s/...), or 'sheet' (teamshared.sheet/v1 JSON/YAML; typed grid, stored as JSON)"New value: +"'markdown' (allowlist sanitizer), 'html' (sanitized raw HTML), 'diagram' (teamshared.diagram/v1 Mermaid or teamshared.diagram/v2 layered 3D scene, JSON/YAML), or 'sheet' (teamshared.sheet/v1 JSON/YAML; typed grid, stored as JSON)"
  2. Changed2 schema fields changed
    • changedInput schema / properties / content / description
      Previous value: -"File body: markdown, raw HTML, or a teamshared.diagram/v1 JSON/YAML document when content_format='diagram'"New value: +"File body: markdown, raw HTML, teamshared.diagram/v1 JSON/YAML when content_format='diagram', or teamshared.sheet/v1 JSON/YAML when content_format='sheet' (stored as JSON)"
    • changedInput schema / properties / content_format / description
      Previous value: -"'markdown' (allowlist sanitizer), 'html' (sanitized raw HTML), or 'diagram' (teamshared.diagram/v1 JSON/YAML; Mermaid on /s/...)"New value: +"'markdown' (allowlist sanitizer), 'html' (sanitized raw HTML), 'diagram' (teamshared.diagram/v1 JSON/YAML; Mermaid on /s/...), or 'sheet' (teamshared.sheet/v1 JSON/YAML; typed grid, stored as JSON)"
  3. Changed3 schema fields changed
    • changedInput schema / properties / content / description
      Previous value: -"File body (markdown or raw HTML)"New value: +"File body: markdown, raw HTML, or a teamshared.diagram/v1 JSON/YAML document when content_format='diagram'"
    • changedInput schema / properties / content_format / description
      Previous value: -"'markdown' (rendered through the allowlist sanitizer) or 'html' (sanitized raw HTML)"New value: +"'markdown' (allowlist sanitizer), 'html' (sanitized raw HTML), or 'diagram' (teamshared.diagram/v1 JSON/YAML; Mermaid on /s/...)"
    • addedInput schema / properties / project_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Attach the new file to this project UUID (kind=artifact)"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / work_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Attach the new file to this work item UUID"
      +}
  5. First observed

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral burden. It discloses default privacy, the need for explicit publishing, immutable version behavior, attachment semantics, diagram format details, caps, and strict schema validation ('Unknown keys are rejected').

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?

The description is long but densely informative, front-loads the core purpose, and uses structured paragraphs and bulleted variants. Every major sentence adds operational value, especially the diagram schema details that would otherwise require external documentation.

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 complex creation tool with 6 parameters and multiple content formats, the description covers defaults, publishing workflow, versioning, attachments, diagram schemas, limits, and validation behavior. An agent has enough context to invoke the tool correctly; the output schema covers return-value needs.

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

Parameters5/5

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

Though schema coverage is 100%, the description substantially enriches parameter meaning. It explains how content_format=diagram maps to two distinct diagram schemas, defines node/edge requirements, caps, and clarifies that work_id/project_id attach to the same shared_files row with kind=artifact for projects.

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 first sentence names a specific verb, resource, and scope: 'Create a new versioned shared file in the caller's org.' It clearly distinguishes the tool from siblings like file_update and file_publish by emphasizing creation, versioning, and the caller's org.

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?

The description explicitly routes to alternatives: call file_publish for public share URLs, and notes that file_update is the operation that creates new immutable version rows. It also gives attachment guidance for work_id and project_id, making the tool's role in the workflow unambiguous.

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.