Skip to main content
Glama

Create a pad

create_document
Idempotent

Generate a shareable URL for a collaborative pad, optionally with initial text and syntax highlighting. Pads are ephemeral and editable by anyone with the link.

Instructions

Creates a pad, optionally with initial content and an editor language, and returns its shareable URL. Without an id a random one is generated. Pads are ephemeral: they are lost when the Rustpad server restarts and after 24 hours without an open connection. Anyone who knows the URL can read and edit the pad. Rustpad has no create operation of its own: a pad exists under any id as soon as it is written to, and set_document or append_to_document on a fresh id makes one just the same.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoDesired pad id; omit to generate a random one
textNoInitial content
languageNoMonaco editor language id for syntax highlighting, e.g. "markdown", "javascript", "rust", "plaintext"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
urlYesShareable; anyone with it can read and edit.
noteYes
createdYes
languageNo
charactersYesLength of the pad after the write, in codepoints.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.4.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "characters": {
      +      "description": "Length of the pad after the write, in codepoints.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "created": {
      +      "const": true,
      +      "type": "boolean"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "language": {
      +      "type": "string"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "Shareable; anyone with it can read and edit.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "url",
      +    "characters",
      +    "note",
      +    "created"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations, the description reveals crucial behaviors: pads are ephemeral (lost on restart and after 24h without connection), anyone with URL can read/edit, and creation is implicit via writing. These are not represented in the 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 somewhat verbose (~90 words) but each sentence adds essential context (ephemeral nature, access control, no create operation). The main purpose is front-loaded in the first sentence.

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

Completeness5/5

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

Covers output (returns URL), behavior (ephemeral, access), alternatives, and parameter semantics. The description is sufficient for an agent to decide when and how to invoke the 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 coverage is 100% and the description adds no information about parameters beyond what the schema already provides (e.g., id optional, language format). Baseline of 3 is appropriate.

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 tool creates a pad with optional initial content and language, and returns a shareable URL. It also clarifies that no dedicated create operation exists, distinguishing it from set_document and append_to_document.

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 mentions alternatives: 'set_document or append_to_document on a fresh id makes one just the same.' Also implies when to use this tool (when a random id is needed, or when setting initial content/language together).

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

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/ni-c/rustpad-mcp'

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