Skip to main content
Glama

Upload from Remote URL

rustypaste_upload_remote

Upload files from remote URLs to rustypaste for hosting. Fetch and mirror remote resources by providing a valid URL to create a rustypaste-hosted copy.

Instructions

Upload a file from a remote URL to rustypaste.

The rustypaste server fetches the file from the provided URL and hosts it. Useful for mirroring or re-hosting remote resources.

Args:

  • url (string): The remote file URL to fetch and upload (must be a valid URL)

Returns: The rustypaste URL for the uploaded file.

Examples:

  • Mirror an image: url="https://example.com/photo.jpg"

  • Re-host a file: url="https://cdn.example.com/release-v1.2.tar.gz"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe remote file URL to upload to rustypaste

Implementation Reference

  • The handler function for 'rustypaste_upload_remote' that calls the RustypasteClient to perform the upload.
    async (params: Input) => {
        try {
            const client = new RustypasteClient();
            const result = await client.uploadRemote(params.url);
            return {
                content: [
                    {
                        type: "text" as const,
                        text: `✅ Remote file uploaded!\n\nURL: ${result.url}\nSource: ${params.url}`,
                    },
                ],
            };
        } catch (error) {
            return {
                isError: true,
                content: [
                    {
                        type: "text" as const,
                        text: `Error: ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
            };
        }
    }
  • The Zod input schema for 'rustypaste_upload_remote'.
    const InputSchema = z.object({
        url: z
            .string()
            .url("Must be a valid URL")
            .describe("The remote file URL to upload to rustypaste"),
    });
  • The registration function 'registerUploadRemote' that defines the MCP tool 'rustypaste_upload_remote'.
    export function registerUploadRemote(server: McpServer): void {
        server.registerTool(
            "rustypaste_upload_remote",
            {
                title: "Upload from Remote URL",
                description: `Upload a file from a remote URL to rustypaste.
    
    The rustypaste server fetches the file from the provided URL and hosts it.
    Useful for mirroring or re-hosting remote resources.
    
    Args:
      - url (string): The remote file URL to fetch and upload (must be a valid URL)
    
    Returns:
      The rustypaste URL for the uploaded file.
    
    Examples:
      - Mirror an image: url="https://example.com/photo.jpg"
      - Re-host a file: url="https://cdn.example.com/release-v1.2.tar.gz"`,
                inputSchema: InputSchema,
                annotations: {
                    readOnlyHint: false,
                    destructiveHint: false,
                    idempotentHint: false,
                    openWorldHint: true,
                },
            },
            async (params: Input) => {
                try {
                    const client = new RustypasteClient();
                    const result = await client.uploadRemote(params.url);
                    return {
                        content: [
                            {
                                type: "text" as const,
                                text: `✅ Remote file uploaded!\n\nURL: ${result.url}\nSource: ${params.url}`,
                            },
                        ],
                    };
                } catch (error) {
                    return {
                        isError: true,
                        content: [
                            {
                                type: "text" as const,
                                text: `Error: ${error instanceof Error ? error.message : String(error)}`,
                            },
                        ],
                    };
                }
            }
        );
    }
Behavior4/5

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

Annotations cover read/write status (readOnlyHint=false), world openness (openWorldHint=true), idempotency (idempotentHint=false), and safety (destructiveHint=false). The description adds valuable context beyond annotations: it explains that 'the rustypaste server fetches the file from the provided URL and hosts it,' clarifying the server-side behavior. However, it does not mention rate limits, auth needs, or file size limits.

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 well-structured and front-loaded: the first sentence states the purpose clearly. Additional sentences provide context, usage, and examples without waste. Each section (Args, Returns, Examples) is concise and adds value. No redundant information is present.

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

Completeness4/5

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

Given the tool's moderate complexity (single parameter, no output schema), the description is mostly complete. It covers purpose, usage context, parameter, and return value. However, it lacks details on potential errors (e.g., invalid URLs, server fetch failures) or behavioral constraints (e.g., file type restrictions, size limits), which would enhance completeness for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'url' fully documented in the schema as 'The remote file URL to upload to rustypaste.' The description adds minimal semantics beyond the schema, only restating the parameter in the Args section and providing examples. Baseline 3 is appropriate as the schema does the heavy lifting.

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: 'Upload a file from a remote URL to rustypaste.' It distinguishes this tool from siblings by specifying remote URL fetching (vs. local file upload in rustypaste_upload_file or text pasting in rustypaste_paste_text). The purpose is precise and differentiated.

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 provides clear context: 'Useful for mirroring or re-hosting remote resources.' It implies when to use this tool (for remote files) but does not explicitly state when not to use it or name alternatives among siblings. The examples reinforce the usage context but lack explicit exclusions.

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/rukh-debug/rustypaste-mcp'

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