Skip to main content
Glama

wals.pro AI 4 weclapp

Preview upload document

preview_upload_document
Read-onlyIdempotent

Preview a document attachment to a weclapp record without upload.

Inline: only after the user explicitly confirms, call execute_approved(approval_token=approval.token, payload={**execution.payload, "content_base64": content_base64}). Keep approved fields unchanged; add matching bytes INSIDE payload. No separate base64 parameter or file.

Args: entity_id: Receiving record id. file_name: Non-empty stored name. content_sha256: SHA-256 of exact bytes. content_type: Detected MIME (PDF, image, Office, text/csv). bytes: Exact length (inline max ~1.5 MB). entity_name: DOCUMENTABLE_ENTITIES type; alias entity_type. description: Optional, max 4000 chars. Returns: Token bound to target, MIME, digest, length; comments validate parent. preconditions: Update access; record exists. post_effects: Single-use token; no upload. Guarded routes:

  • transport="agent_upload" (no inline fields, 20 MB): native file or connector file_path; same file at execute.

  • transport="agent_upload_batch": entity_name and connector file_paths (2–10 distinct targets, 20 MB); no entity_id.

  • Status: only upload_intent_ref; read-only.

  • Article image: entity_name="article", target="image", article_image={article_image_id? (replace), main_image?}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
bytesNo
targetNo
entity_idNo
file_nameNo
transportNo
descriptionNo
entity_nameNo
entity_typeNo
content_typeNo
article_imageNo
content_sha256No
correlation_idNo
upload_intent_refNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed22 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "NativeFileInput": {
      +    "description": "Native client file parameter; file contents stay outside model JSON.",
      +    "properties": {
      +      "download_url": {
      +        "title": "Download Url",
      +        "type": "string"
      +      },
      +      "file_id": {
      +        "title": "File Id",
      +        "type": "string"
      +      },
      +      "file_name": {
      +        "title": "File Name",
      +        "type": "string"
      +      },
      +      "mime_type": {
      +        "title": "Mime Type",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "download_url",
      +      "file_id"
      +    ],
      +    "title": "NativeFileInput",
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / article_image
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Article Image"
      +}
    • addedInput schema / properties / bytes / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / bytes / default
      Added value: +null
    • removedInput schema / properties / bytes / type
      Removed value: -"integer"
    • addedInput schema / properties / content_sha256 / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / content_sha256 / default
      Added value: +null
    • removedInput schema / properties / content_sha256 / type
      Removed value: -"string"
    • addedInput schema / properties / content_type / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / content_type / default
      Added value: +null
    • removedInput schema / properties / content_type / type
      Removed value: -"string"
    • addedInput schema / properties / entity_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / entity_id / default
      Added value: +null
    • removedInput schema / properties / entity_id / type
      Removed value: -"string"
    • addedInput schema / properties / file
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/NativeFileInput"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / file_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / file_name / default
      Added value: +null
    • removedInput schema / properties / file_name / type
      Removed value: -"string"
    • addedInput schema / properties / target
      Added value: +{
      +  "anyOf": [
      +    {
      +      "const": "image",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Target"
      +}
    • addedInput schema / properties / transport
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "agent_upload",
      +        "agent_upload_batch"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Transport"
      +}
    • addedInput schema / properties / upload_intent_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Upload Intent Ref"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "entity_id",
      -  "file_name",
      -  "content_sha256",
      -  "content_type",
      -  "bytes"
      -]
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint, but the description adds real value beyond them: single-use token semantics, 'no upload' post-effect, update-access precondition, inline size cap ~1.5 MB, batch 2-10 targets at 20 MB, and status-only intent refs. The only soft spot is that a chunk of text describes the downstream execute_approved call rather than this tool's own behavior.

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?

Purpose is front-loaded and the Args/preconditions/post_effects/guarded-routes structure is scannable, but the description is heavy and contains terse fragments ('Keep approved fields unchanged; add matching bytes INSIDE payload', 'No separate base64 parameter or file') that cost clarity rather than earning their place.

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?

For a 14-parameter tool with zero schema coverage, the description covers the vast majority of parameters, preconditions, size limits and transport branches, and an output schema exists so return values need not be re-explained. Minor gaps remain around correlation_id and the file object.

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?

Schema description coverage is 0% across 14 parameters, so the description must carry the load, and it does: it documents entity_id, file_name, content_sha256, content_type, bytes, entity_name/entity_type alias, description, plus transport, upload_intent_ref, target and article_image through the guarded-routes section. Only correlation_id and the NativeFileInput 'file' object remain undocumented.

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 opening sentence gives a specific verb, resource and scope: 'Preview a document attachment to a weclapp record without upload.' It implicitly routes to execute_approved for the actual upload, but never explicitly contrasts itself with the sibling download_document or search_documents, so differentiation is only partial.

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 conditions: inline mode requires explicit user confirmation before calling execute_approved, preconditions state update access and record existence, and the guarded routes section explains which transport to pick (agent_upload vs agent_upload_batch) and when entity_id is absent. It stops short of naming an alternative tool to use instead of this one.

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