Skip to main content
Glama

Paste Text

rustypaste_paste_text

Upload text content to create shareable paste URLs for code snippets, notes, logs, or any text files. Specify content and optional filename to generate a URL.

Instructions

Upload text content to rustypaste and get a shareable URL.

Use this to paste code snippets, notes, logs, or any text content. The text is uploaded as a file and a URL is returned.

Args:

  • content (string): The text to paste (required, non-empty)

  • filename (string, optional): Name for the paste file (default: "paste.txt")

Returns: The URL of the created paste.

Examples:

  • Paste a log excerpt: content="error at line 42: null pointer"

  • Paste code with a name: content="def main(): ...", filename="app.py"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe text content to paste
filenameNoOptional filename for the paste (e.g. 'notes.md'). Defaults to 'paste.txt'

Implementation Reference

  • The handler function that executes the rustypaste_paste_text tool logic, utilizing RustypasteClient to upload the text.
    async (params: Input) => {
        try {
            const client = new RustypasteClient();
            const result = await client.pasteText(params.content, params.filename);
            return {
                content: [
                    {
                        type: "text" as const,
                        text: `✅ Paste created successfully!\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 definition for the rustypaste_paste_text tool.
    const InputSchema = z.object({
        content: z
            .string()
            .min(1, "Content must not be empty")
            .describe("The text content to paste"),
        filename: z
            .string()
            .optional()
            .describe(
                "Optional filename for the paste (e.g. 'notes.md'). Defaults to 'paste.txt'"
            ),
    });
    
    type Input = z.infer<typeof InputSchema>;
  • The registration logic for the rustypaste_paste_text tool on the MCP server.
        server.registerTool(
            "rustypaste_paste_text",
            {
                title: "Paste Text",
                description: `Upload text content to rustypaste and get a shareable URL.
    
    Use this to paste code snippets, notes, logs, or any text content.
    The text is uploaded as a file and a URL is returned.
    
    Args:
      - content (string): The text to paste (required, non-empty)
      - filename (string, optional): Name for the paste file (default: "paste.txt")
    
    Returns:
      The URL of the created paste.
    
    Examples:
      - Paste a log excerpt: content="error at line 42: null pointer"
      - Paste code with a name: content="def main(): ...", filename="app.py"`,
                inputSchema: InputSchema,
                annotations: {
                    readOnlyHint: false,
                    destructiveHint: false,
                    idempotentHint: false,
                    openWorldHint: true,
                },
            },
            async (params: Input) => {
                try {
                    const client = new RustypasteClient();
                    const result = await client.pasteText(params.content, params.filename);
                    return {
                        content: [
                            {
                                type: "text" as const,
                                text: `✅ Paste created successfully!\n\nURL: ${result.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?

The description adds valuable behavioral context beyond annotations: it explains that 'The text is uploaded as a file and a URL is returned,' clarifying the output format. Annotations already indicate it's not read-only, not idempotent, not destructive, and open-world, but the description enhances understanding of the tool's operation without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage, args, returns, examples) and is appropriately sized. However, the 'Args' and 'Returns' sections are somewhat redundant given the schema, slightly reducing efficiency. Most sentences earn their place by providing useful context.

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, rich annotations, and full schema coverage, the description is mostly complete. It explains the tool's purpose, usage, and output format, though it lacks details on error handling or rate limits. Without an output schema, the description adequately covers the return value, but could be more comprehensive.

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 input schema already fully documents the parameters. The description includes an 'Args' section that repeats this information without adding significant meaning beyond the schema, such as constraints or usage nuances. This meets the baseline for high schema coverage.

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 text content to rustypaste') and the outcome ('get a shareable URL'), distinguishing it from sibling tools that handle files, URLs, or oneshot operations. It explicitly mentions the resource ('text content') and verb ('upload'), making the purpose unambiguous.

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 on when to use this tool ('Use this to paste code snippets, notes, logs, or any text content'), but it does not explicitly differentiate from sibling tools like rustypaste_upload_file or rustypaste_oneshot_file. It offers general guidance but lacks specific alternatives or 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