Skip to main content
Glama

One-Shot URL Redirect

rustypaste_oneshot_url

Create a one-time URL redirect that expires after a single visit to share sensitive links securely.

Instructions

Create a one-shot URL redirect — the link expires after a single visit.

Wraps a URL in a one-time redirect. After the first person clicks it, the redirect is deleted from the server.

Args:

  • url (string): The target URL to wrap (must be a valid URL)

Returns: The one-shot redirect URL.

Examples:

  • One-time link: url="https://example.com/sensitive-doc"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to create a one-shot redirect for

Implementation Reference

  • The handler function that executes the rustypaste_oneshot_url tool.
    async (params: Input) => {
        try {
            const client = new RustypasteClient();
            const result = await client.oneshotUrl(params.url);
            return {
                content: [
                    {
                        type: "text" as const,
                        text: `✅ One-shot URL created!\n\n⚠️ This redirect will expire after a single visit.\n\nURL: ${result.url}`,
                    },
                ],
            };
        } catch (error) {
            return {
                isError: true,
                content: [
                    {
                        type: "text" as const,
                        text: `Error: ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
            };
        }
    }
  • The registration of the rustypaste_oneshot_url tool.
    export function registerOneshotUrl(server: McpServer): void {
        server.registerTool(
            "rustypaste_oneshot_url",
            {
                title: "One-Shot URL Redirect",
                description: `Create a one-shot URL redirect — the link expires after a single visit.
    
    Wraps a URL in a one-time redirect. After the first person clicks it,
    the redirect is deleted from the server.
    
    Args:
      - url (string): The target URL to wrap (must be a valid URL)
    
    Returns:
      The one-shot redirect URL.
    
    Examples:
      - One-time link: url="https://example.com/sensitive-doc"`,
                inputSchema: InputSchema,
                annotations: {
                    readOnlyHint: false,
                    destructiveHint: false,
                    idempotentHint: false,
                    openWorldHint: true,
                },
            },
            async (params: Input) => {
                try {
                    const client = new RustypasteClient();
                    const result = await client.oneshotUrl(params.url);
                    return {
                        content: [
                            {
                                type: "text" as const,
                                text: `✅ One-shot URL created!\n\n⚠️ This redirect will expire after a single visit.\n\nURL: ${result.url}`,
                            },
                        ],
                    };
                } catch (error) {
                    return {
                        isError: true,
                        content: [
                            {
                                type: "text" as const,
                                text: `Error: ${error instanceof Error ? error.message : String(error)}`,
                            },
                        ],
                    };
                }
            }
        );
  • The input schema for the rustypaste_oneshot_url tool.
    const InputSchema = z.object({
        url: z
            .string()
            .url("Must be a valid URL")
            .describe("The URL to create a one-shot redirect for"),
    });
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it explains that the redirect is 'deleted from the server' after first use, which clarifies the 'one-shot' mechanism. Annotations already indicate this is a non-readOnly, non-destructive operation, but the description provides specific implementation details about deletion behavior.

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?

Perfectly structured with clear sections: purpose statement, behavioral explanation, Args, Returns, and Examples. Every sentence earns its place with zero waste. The information is front-loaded with the core functionality stated first.

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?

For a single-parameter tool with good annotations and no output schema, the description provides excellent context about behavior and usage. The only minor gap is that it doesn't explicitly describe the return format beyond 'The one-shot redirect URL', but given the tool's simplicity, this is adequate.

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?

With 100% schema description coverage, the schema already fully documents the single 'url' parameter. The description adds minimal value beyond restating that it's 'The target URL to wrap (must be a valid URL)', which is essentially what the schema already says. Baseline 3 is appropriate when 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 ('Create a one-shot URL redirect') and resource ('URL'), distinguishing it from siblings like rustypaste_shorten_url (persistent) and rustypaste_oneshot_file (file-based). It precisely defines the one-time expiration behavior.

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

Usage Guidelines5/5

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

Explicitly states when to use this tool ('Create a one-shot URL redirect — the link expires after a single visit') and distinguishes it from alternatives by describing its unique single-use behavior. The sibling tools list provides clear context for different use cases.

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