Skip to main content
Glama

postedly_upload_document

Stores a file directly from its exact bytes without a browser. Accepts canonical base64 for valid unencrypted PDF, up to 10 MiB decoded. An optional expected SHA-256 mismatch rejects the upload. Returns a private document ID, page count, byte count, SHA-256 and authenticated preview URL. Service-specific layout validation occurs during quoting. No quote, payment or send occurs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYes
filenameYesFilename only, without a local path.
contentBase64YesStandard padded base64 of the exact file bytes. No data URL prefix or whitespace.
expectedSha256NoOptional SHA-256 computed from the original file bytes; a mismatch rejects the upload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / oneOf
      Removed value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "contentBase64"
      -      ]
      -    },
      -    "required": [
      -      "file"
      -    ]
      -  },
      -  {
      -    "not": {
      -      "required": [
      -        "file"
      -      ]
      -    },
      -    "required": [
      -      "filename",
      -      "contentBase64"
      -    ]
      -  }
      -]
    • changedInput schema / properties / contentBase64 / description
      Previous value: -"Standard padded base64 of actual file bytes, for clients that can read the exact bytes. No data URL prefix or whitespace; never invent base64."New value: +"Standard padded base64 of the exact file bytes. No data URL prefix or whitespace."
    • removedInput schema / properties / file
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "download_url": {
      -      "description": "Actual temporary HTTPS download URL supplied by ChatGPT; never invent a URL.",
      -      "maxLength": 8192,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "file_id": {
      -      "maxLength": 256,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "file_name": {
      -      "maxLength": 180,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "mime_type": {
      -      "enum": [
      -        "application/pdf",
      -        "application/octet-stream"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "download_url",
      -    "file_id"
      -  ],
      -  "type": "object"
      -}
    • changedInput schema / properties / filename / description
      Previous value: -"Filename only, without a local path. Optional for native attachments; defaults to their file_name or Attachment.pdf."New value: +"Filename only, without a local path."
    • changedInput schema / required
      Previous value: -[
      -  "service"
      -]New value: +[
      +  "service",
      +  "filename",
      +  "contentBase64"
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "https://json-schema.org/draft/2020-12/schema",
      -  "anyOf": [
      -    {
      -      "additionalProperties": false,
      -      "properties": {
      -        "document": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "bytes": {
      -              "maximum": 10485760,
      -              "minimum": 1,
      -              "type": "integer"
      -            },
      -            "contentType": {
      -              "const": "application/pdf"
      -            },
      -            "id": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "name": {
      -              "type": "string"
      -            },
      -            "pages": {
      -              "maximum": 50,
      -              "minimum": 1,
      -              "type": "integer"
      -            },
      -            "previewUrl": {
      -              "format": "uri-reference",
      -              "type": "string"
      -            },
      -            "sha256": {
      -              "pattern": "^[a-f0-9]{64}$",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "name",
      -            "pages",
      -            "bytes",
      -            "sha256",
      -            "previewUrl",
      -            "contentType"
      -          ],
      -          "type": "object"
      -        },
      -        "documentId": {
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        },
      -        "previewRequiresAuthentication": {
      -          "const": true
      -        }
      -      },
      -      "required": [
      -        "documentId",
      -        "document",
      -        "previewRequiresAuthentication",
      -        "message"
      -      ],
      -      "type": "object"
      -    },
      -    {
      -      "additionalProperties": false,
      -      "properties": {
      -        "error": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "code": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "details": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "addressRole": {
      -                  "enum": [
      -                    "recipient",
      -                    "sender"
      -                  ]
      -                },
      -                "canSendAsEntered": {
      -                  "type": "boolean"
      -                }
      -              },
      -              "required": [
      -                "addressRole",
      -                "canSendAsEntered"
      -              ],
      -              "type": "object"
      -            },
      -            "message": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "code",
      -            "message"
      -          ],
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "error"
      -      ],
      -      "type": "object"
      -    }
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed6 schema fields changed
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "contentBase64"
      +      ]
      +    },
      +    "required": [
      +      "file"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "required": [
      +        "file"
      +      ]
      +    },
      +    "required": [
      +      "filename",
      +      "contentBase64"
      +    ]
      +  }
      +]
    • changedInput schema / properties / contentBase64 / description
      Previous value: -"Standard padded base64 of the exact file bytes. No data URL prefix or whitespace."New value: +"Standard padded base64 of actual file bytes, for clients that can read the exact bytes. No data URL prefix or whitespace; never invent base64."
    • addedInput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "download_url": {
      +      "description": "Actual temporary HTTPS download URL supplied by ChatGPT; never invent a URL.",
      +      "maxLength": 8192,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "maxLength": 180,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "enum": [
      +        "application/pdf",
      +        "application/octet-stream"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / filename / description
      Previous value: -"Filename only, without a local path."New value: +"Filename only, without a local path. Optional for native attachments; defaults to their file_name or Attachment.pdf."
    • changedInput schema / required
      Previous value: -[
      -  "service",
      -  "filename",
      -  "contentBase64"
      -]New value: +[
      +  "service"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "document": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "bytes": {
      +              "maximum": 10485760,
      +              "minimum": 1,
      +              "type": "integer"
      +            },
      +            "contentType": {
      +              "const": "application/pdf"
      +            },
      +            "id": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "name": {
      +              "type": "string"
      +            },
      +            "pages": {
      +              "maximum": 50,
      +              "minimum": 1,
      +              "type": "integer"
      +            },
      +            "previewUrl": {
      +              "format": "uri-reference",
      +              "type": "string"
      +            },
      +            "sha256": {
      +              "pattern": "^[a-f0-9]{64}$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "name",
      +            "pages",
      +            "bytes",
      +            "sha256",
      +            "previewUrl",
      +            "contentType"
      +          ],
      +          "type": "object"
      +        },
      +        "documentId": {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "previewRequiresAuthentication": {
      +          "const": true
      +        }
      +      },
      +      "required": [
      +        "documentId",
      +        "document",
      +        "previewRequiresAuthentication",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "error": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "code": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "details": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "addressRole": {
      +                  "enum": [
      +                    "recipient",
      +                    "sender"
      +                  ]
      +                },
      +                "canSendAsEntered": {
      +                  "type": "boolean"
      +                }
      +              },
      +              "required": [
      +                "addressRole",
      +                "canSendAsEntered"
      +              ],
      +              "type": "object"
      +            },
      +            "message": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "message"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false, so the description carries most behavioral disclosure. It adds meaningful details: the accepted base64 form, size limit, SHA-256 rejection behavior, returned document metadata, privacy ('private document ID'), and authenticated preview URL. It does not contradict the annotations and goes beyond them, though it omits explicit persistence or lifetime details.

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?

Three dense sentences with no filler. Every sentence earns its place: input constraints, optional parameter behavior, outputs, and boundary statements are all covered in a compact, front-loaded structure.

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 tool with no output schema and minimal annotations, the description is remarkably complete. It discloses inputs, optional validation, return payload contents, privacy, and what it does not do (quote/payment/send). An agent has enough information to call it correctly and interpret its results.

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 covers 75% of parameter descriptions, and the description adds value by specifying 'canonical base64 for valid unencrypted PDF, up to 10 MiB decoded' and by clarifying that layout validation is deferred to quoting. It also ties expectedSha256 behavior to rejection. This goes beyond schema-only semantics.

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 description states a specific action ('Stores a file directly from its exact bytes without a browser') and clearly ties it to the upload resource. It also distinguishes itself from sibling flow tools by explicitly noting 'No quote, payment or send occurs,' which prevents confusion with postedly_quote, postedly_checkout, or postedly_prepare_document.

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?

The description gives clear context for when to use the tool: when uploading raw file bytes directly without a browser. It also sets boundaries ('No quote, payment or send occurs') and points out that layout validation happens later during quoting, which helps an agent decide this is the right pre-step. It does not name sibling alternatives explicitly, but the usage context is sufficient.

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