Skip to main content
Glama

Import Resource

import_resource

Import a stock candidate (candidateId from search_resources) into a project as an ORG-OWNED media item — provider/externalId/license provenance preserved, bytes deduped across orgs. Pass projectId + candidateId. Returns { id, status:"importing"|"ready" }; processing is async — call wait_job(kind="media", id=mediaItemId), then use the returned id as a composition source. Gated on the resource_import plan feature (402 billing_required if your plan lacks it). COST: 0 credits — search and import are both free for a keyed caller (get_account → entitlements.resource_import.listUsdPerUnit is 0); imported bytes count toward the storage gauge. 422 candidate_mismatch if the candidate expired — re-run search_resources.

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": {
      "body": "<body>"
    },
    "name": "import_resource"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesPOST /resources/import body — stock candidate lane { projectId, candidateId } OR curated pack lane { kind:"sfx-pack"|"music-pack", id }.
commandIdNoRetry identity. A call repeated with the same commandId returns the first result instead of acting twice.

Output Schema

NameRequiredDescriptionDefault
idNo
statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "__schema0": {
      +    "enum": [
      +      "sfx-pack",
      +      "music-pack"
      +    ],
      +    "type": "string"
      +  },
      +  "__schema1": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "__schema2": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "__schema3": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "__schema4": {
      +    "maxLength": 128,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / body / properties / candidateId / $ref
      Added value: +"#/$defs/__schema3"
    • removedInput schema / properties / body / properties / candidateId / minLength
      Removed value: -1
    • removedInput schema / properties / body / properties / candidateId / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / id / $ref
      Added value: +"#/$defs/__schema1"
    • removedInput schema / properties / body / properties / id / minLength
      Removed value: -1
    • removedInput schema / properties / body / properties / id / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / kind / $ref
      Added value: +"#/$defs/__schema0"
    • removedInput schema / properties / body / properties / kind / enum
      Removed value: -[
      -  "sfx-pack",
      -  "music-pack"
      -]
    • removedInput schema / properties / body / properties / kind / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / projectId / $ref
      Added value: +"#/$defs/__schema2"
    • removedInput schema / properties / body / properties / projectId / minLength
      Removed value: -1
    • removedInput schema / properties / body / properties / projectId / type
      Removed value: -"string"
    • addedInput schema / properties / commandId / $ref
      Added value: +"#/$defs/__schema4"
    • removedInput schema / properties / commandId / maxLength
      Removed value: -128
    • removedInput schema / properties / commandId / minLength
      Removed value: -1
    • removedInput schema / properties / commandId / type
      Removed value: -"string"
  2. Changed1 schema field changed
    • addedInput schema / properties / commandId
      Added value: +{
      +  "description": "Retry identity. A call repeated with the same commandId returns the first result instead of acting twice.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / body / example
      Added value: +{
      +  "candidateId": "cand_01J8Z3K9Q2X4Y5W6V7T8R9S0P1",
      +  "projectId": "abcdefghij1234567890abcdef123456"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial context beyond the annotations (readOnly=false, idempotent=false, destructive=false): async processing with status importing|ready, the exact follow-up wait_job call, storage-gauge accounting, zero credit cost with the entitlement field to verify it, and the 402/422 failure modes. No contradiction with the annotations — the per-commandId retry note is scoped to body.commandId and does not conflict with idempotentHint=false.

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?

Front-loaded with the action and scope, then sequencing, then cost/errors — a sensible order with no filler sentences. The COST sentence is somewhat dense with the get_account/entitlements parenthetical, which is the only clause that could be trimmed.

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?

Covers what an agent needs for the common path: preconditions, async lifecycle, follow-up tool, return shape documented by the existing output schema, and error codes. The one gap is the curated pack lane (kind/id) permitted by the schema, which the description never mentions, leaving that branch to the schema alone.

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 description coverage is 100%, so the schema baseline is 3. The description adds useful provenance for candidateId (comes from search_resources) but its instruction "Pass projectId + candidateId" omits the second supported body shape (kind:"sfx-pack"|"music-pack" + id) that the schema explicitly documents, so the description under-states the parameter surface rather than enriching it.

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?

Names a specific verb and resource plus the exact scope: import a stock candidate (candidateId from search_resources) into a project as an org-owned media item with provenance and cross-org dedup. This clearly separates it from import_media (external files) and from search_resources (discovery), which is the distinction an agent actually needs.

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?

Gives real sequencing guidance: call after search_resources, then wait_job(kind="media", id=mediaItemId), then use the returned id as a composition source. Also documents prerequisites (resource_import plan feature, 402 billing_required) and recovery on 422 candidate_mismatch (re-run search_resources). It stops short of naming when to prefer import_media or a pack lane instead, so not a 5.

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.