Skip to main content
Glama

Import a Hosted App file from a URL

import_app_file
Destructive

A ChatGPT user can attach the file, or point at one ChatGPT made. Another client can pass any public https URL as file.download_url, with any file_id. The server fetches that URL once over HTTPS and stages the bytes, replacing the path. Then publish as usual. The area belongs to this project, publisher and slug; a taken slug you cannot manage is refused with slug_unavailable. See request_app_upload_url for shared upload limits, chunking, expiry and staging lifecycle rules.

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": {
      "slug": "<slug>",
      "path": "<path>",
      "file": "<file>"
    },
    "name": "import_app_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYes
pathYesRelative file path
slugYes1–64 lowercase letters, digits and internal hyphens; an app need not exist yet
content_typeNoType inferred from extension when omitted. For a recognized extension, explicit content_type must match; otherwise an explicit allowed content_type is required. Allowed types (extension: content_type): .cjs: text/javascript; .css: text/css; .csv: text/csv; .gif: image/gif; .htm: text/html; .html: text/html; .ico: image/x-icon; .jpeg: image/jpeg; .jpg: image/jpeg; .js: text/javascript; .json: application/json; .md: text/markdown; .mjs: text/javascript; .otf: font/otf; .pdf: application/pdf; .png: image/png; .svg: image/svg+xml; .ttf: font/ttf; .txt: text/plain; .wasm: application/wasm; .webp: image/webp; .woff: font/woff; .woff2: font/woff2. PDFs are served as downloads: an app fetches their bytes to process them, and they cannot be shown inline.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true, openWorldHint=true and idempotentHint=false, and the description corroborates the destructive aspect with 'replacing the path' and the single-fetch behavior, plus the slug_unavailable failure mode for unmanageable slugs. However, it never says what happens to the previously staged file, whether a retry re-fetches or reuses bytes, or whether the slug must already exist, leaving meaningful behavioral gaps for a mutation tool.

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

Conciseness3/5

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

The text is reasonably compact with no filler, but it is not front-loaded: the first sentence describes who can call it rather than what the tool does, and the phrase 'The area belongs to this project, publisher and slug' is awkward and slows parsing. A lead sentence stating the fetch-and-stage action would tighten it considerably.

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

Completeness3/5

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

For a tool with a nested file object, three required parameters and no output schema, the description covers the fetch, overwrite and error path but never states what is returned after staging, nor how the staged file relates to publish_app_version beyond 'publish as usual'. It also defers the staging lifecycle rules to a sibling, so an agent must make a second call to be fully informed.

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 75% schema coverage the schema already explains download_url, content_type inference and file_id, yet the description still adds value by stating that any file_id is acceptable because it is only a caller identifier, and by tying slug ownership to a specific error (slug_unavailable). It does not clarify path semantics or the staged-path relationship beyond what the schema says.

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 tool stages a file's bytes into a hosted app from a public URL and the description conveys that through 'The server fetches that URL once over HTTPS and stages the bytes, replacing the path.' It is clear enough to distinguish from the upload-URL sibling, which it names, but the opening sentence describes the caller scenario rather than stating the action, so the agent must assemble the purpose from later sentences.

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 concrete usage contexts: a ChatGPT user attaching a file, or another client passing any public https URL as file.download_url, and it tells the caller to 'publish as usual' afterwards and to consult request_app_upload_url for limits, chunking and expiry. It stops short of saying when to prefer stage_app_file or read_app_file instead, so alternatives are only partially addressed.

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