Skip to main content
Glama

Save an upload as a Library item

soclo_library_finalize
Idempotent

Finalize an uploaded file into an immutable saved Library asset. Without confirm: true it returns a preview and saves nothing; pass confirm: true after the owner approved the exact item. Needs the separate manage:library grant. Finalize keeps its original UUID clientRequestId and the same receipt the app records. After interruption read soclo_library_finalize_status with the original ids; never substitute ids or repeat blindly. Debits no customer credits.

Input Schema

NameRequiredDescriptionDefault
kindYes
tagsNo
titleNo
widthNo
bucketNo
heightNo
sourceYes
confirmNo
subjectNo
mimeTypeYes
uploadIdYes
durationMsNo
clientRequestIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / definitions
      Added value: +{
      +  "s1": {
      +    "format": "uuid",
      +    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / clientRequestId / $ref
      Added value: +"#/definitions/s1"
    • removedInput schema / properties / clientRequestId / format
      Removed value: -"uuid"
    • removedInput schema / properties / clientRequestId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / clientRequestId / type
      Removed value: -"string"
    • addedInput schema / properties / uploadId / $ref
      Added value: +"#/definitions/s1"
    • removedInput schema / properties / uploadId / format
      Removed value: -"uuid"
    • removedInput schema / properties / uploadId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / uploadId / type
      Removed value: -"string"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: immutability of the resulting asset, the two-phase preview/confirm gate, a separate manage:library grant requirement, idempotency mechanics (same clientRequestId UUID and same receipt), recovery via the status tool without id substitution, and that no credits are debited. That is exactly the behavioral context annotations cannot express.

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 purpose and then the confirm gate, and every clause carries operational weight (grant, idempotency, recovery, cost). Slightly dense and run-on in the 'keeps its original UUID clientRequestId and the same receipt' sentence, keeping it short of a 5.

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 13-parameter mutation with no output schema, it covers the things an agent would otherwise get wrong: don't commit before approval, don't retry without the status tool, distinct permission required, no billing impact. Remaining gaps (metadata field semantics) are schema-level rather than definition-level.

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 0% across 13 parameters, so the description must carry the load. It gives real meaning for confirm (preview vs. commit) and for clientRequestId (idempotency key preserved across retries), but says nothing about uploadId, kind, mimeType, source, tags, title, width/height, bucket, durationMs or subject — most of the surface remains undocumented.

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?

States a specific verb and resource chain: an uploaded file becomes an immutable saved Library asset. That cleanly separates it from soclo_library_upload (which only uploads) and soclo_library_update (which mutates an existing item), so an agent can route without opening schemas.

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?

Gives an explicit when-not (without confirm: true it only previews and saves nothing), an explicit when (after the owner approved the exact item), and names the alternative for the failure path (soclo_library_finalize_status with the original ids). Exclusions and alternatives are all present.

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