Skip to main content
Glama

Set the editor language

set_language
Idempotent

Set the syntax-highlighting language for a shared pad, with changes visible to all current viewers.

Instructions

Sets the syntax-highlighting language of a pad (Monaco language id, e.g. "markdown", "javascript", "rust"). Last writer wins; the change is visible to everyone who has the pad open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesId of the pad, the part after # in its URL
languageYesMonaco 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
languageYes
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"
      +    },
      +    "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",
      +    "language"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already indicate this is a write operation (readOnlyHint=false) and idempotent (idempotentHint=true). The description adds valuable behavioral details beyond those: 'Last writer wins' and 'the change is visible to everyone who has the pad open'. This discloses concurrency and visibility effects that are not encoded in the annotations, enhancing the agent's understanding of side effects.

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?

Two sentences, zero waste. The purpose is front-loaded, and the behavioral caveat is delivered concisely. Every word earns its place, and the structure makes it easy for an agent to quickly grasp both action and side effects.

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?

For a simple two-parameter tool with a clear output schema (even though its details are not shown here), the description covers all essential aspects: what it does, its effect on other users, and concurrency semantics. The schema covers parameter specifics, so nothing an agent needs to invoke it correctly is missing.

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?

The input schema already provides thorough descriptions for both parameters, including regex patterns, length constraints, and examples. The description adds no extra meaning about the parameters themselves—it only reiterates that language uses Monaco IDs. With 100% schema coverage, the description meets the baseline without needing to compensate.

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 states a specific verb and resource ('Sets the syntax-highlighting language of a pad') and provides concrete examples of valid values (markdown, javascript, rust). It is clearly distinct from sibling tools like set_document, which likely handles content, making the purpose unmistakable.

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 explains what the tool does and mentions a concurrency behavior (last writer wins), which gives some context for when it applies. However, it does not explicitly contrast this tool with siblings such as set_document or append_to_document, nor state when not to use it. An agent must infer that this is exclusively for changing language, not content.

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