Skip to main content
Glama

upload_and_attach_document

Upload PDF or DOCX files to attach them to digital signature envelopes for signing workflows.

Instructions

Upload a local file (PDF/DOCX) and attach it to an envelope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envelopeIdYesEnvelope UUID
filePathYesAbsolute path to the file to upload
documentNameNoDisplay name for the document

Implementation Reference

  • The 'upload_and_attach_document' tool is registered and implemented in src/index.js. The handler takes envelopeId, filePath, and an optional documentName, then calls api.uploadFile and api.addDocument to complete the operation.
    server.tool(
      'upload_and_attach_document',
      'Upload a local file (PDF/DOCX) and attach it to an envelope.',
      {
        envelopeId: z.string().describe('Envelope UUID'),
        filePath: z.string().describe('Absolute path to the file to upload'),
        documentName: z.string().optional().describe('Display name for the document'),
      },
      async ({ envelopeId, filePath, documentName }) => {
        try {
          const path = await import('node:path');
          const file = await api.uploadFile(creds, filePath);
          const doc = await api.addDocument(creds, envelopeId, {
            fileId: file.id,
            name: documentName || path.basename(filePath),
          });
          return result({ file, document: doc });
        } catch (err) {
          return errorResult(err);
        }
      }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/davidsimoes/digisign-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server