Skip to main content
Glama

generate_file_upload_url

Creates a secure, temporary upload link for files to be used in Opus workflow automation, specifying file type and access permissions.

Instructions

Generate presigned URL for file upload. Returns presignedUrl (for uploading) and fileUrl (to reference in job execution)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileExtensionYesFile extension with dot (e.g., .pdf, .jpeg, .png, .docx, .csv, .xlsx, .txt, .json, .html, .xml)
accessScopeNoAccess scope for the fileorganization

Implementation Reference

  • The main handler function for the generate_file_upload_url tool. It makes a POST request to the Opus API endpoint /job/file/upload to generate presigned URLs for file upload and returns them in the MCP response format.
    private async generateFileUploadUrl(args: any) { const { fileExtension, accessScope = "organization" } = args; const response = await this.axiosInstance.post("/job/file/upload", { fileExtension, accessScope, }); return { content: [ { type: "text", text: JSON.stringify( { presignedUrl: response.data.presignedUrl, fileUrl: response.data.fileUrl, instructions: "Use presignedUrl to upload file via PUT request (no auth headers). Use fileUrl in job execution payload.", }, null, 2 ), }, ], }; }
  • src/index.ts:153-174 (registration)
    Tool registration in the getTools() method, including name, description, and input schema definition.
    { name: "generate_file_upload_url", description: "Generate presigned URL for file upload. Returns presignedUrl (for uploading) and fileUrl (to reference in job execution)", inputSchema: { type: "object", properties: { fileExtension: { type: "string", description: "File extension with dot (e.g., .pdf, .jpeg, .png, .docx, .csv, .xlsx, .txt, .json, .html, .xml)", }, accessScope: { type: "string", enum: ["all", "user", "workspace", "organization"], description: "Access scope for the file", default: "organization", }, }, required: ["fileExtension"], }, },
  • Input schema defining parameters for the generate_file_upload_url tool: fileExtension (required) and accessScope (optional).
    inputSchema: { type: "object", properties: { fileExtension: { type: "string", description: "File extension with dot (e.g., .pdf, .jpeg, .png, .docx, .csv, .xlsx, .txt, .json, .html, .xml)", }, accessScope: { type: "string", enum: ["all", "user", "workspace", "organization"], description: "Access scope for the file", default: "organization", }, }, required: ["fileExtension"], },
  • Dispatch in the CallToolRequestSchema handler that routes calls to the generateFileUploadUrl method.
    case "generate_file_upload_url": return await this.generateFileUploadUrl(args);

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/Moenamatics/Opus-MCP'

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