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);
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns two URLs (presignedUrl and fileUrl) and their purposes, which adds behavioral context. However, it lacks details on permissions needed, rate limits, expiration times for URLs, or error conditions, leaving gaps in behavioral transparency for a tool that generates upload URLs.

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?

The description is front-loaded with the core purpose in the first sentence and efficiently adds return value details in the second sentence. There is no wasted text, and every sentence earns its place by providing essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description provides basic purpose and return values but lacks details on behavioral aspects like authentication, rate limits, or error handling. For a tool with 2 parameters and no structured output documentation, it is minimally adequate but has clear gaps in completeness.

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?

The input schema has 100% description coverage, so the baseline is 3. The description does not add specific details about parameters beyond what the schema provides, but it contextually implies that fileExtension is used to generate a URL for a file of that type, and accessScope might relate to who can access the uploaded file. This adds marginal semantic value, raising the score slightly.

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 clearly states the specific action ('Generate presigned URL for file upload') and the resource ('file upload'), distinguishing it from sibling tools like execute_job or get_job_status that handle job execution and monitoring. It explicitly mentions what the tool returns, which helps differentiate its purpose from other tools in the server.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning that the generated fileUrl is 'to reference in job execution', suggesting this tool is used as a preparatory step for jobs. However, it does not explicitly state when to use this tool versus alternatives or provide any exclusions or prerequisites for its use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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