Skip to main content
Glama
Moenamatics

Opus MCP Server

by Moenamatics

generate_file_upload_url

Generate a presigned URL to upload files for use in Opus workflow automation jobs, providing both upload and reference URLs.

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 handler function that makes an API call to generate presigned URLs for file upload and returns the results formatted for MCP.
    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 ), }, ], }; }
  • Input schema defining the 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"], },
  • src/index.ts:153-174 (registration)
    Tool registration in the list returned by getTools(), including name, description, and input schema.
    { 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"], }, },
  • src/index.ts:84-85 (registration)
    Dispatch case 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