Skip to main content
Glama
worldnine
by worldnine

write-text

Write and manage text in Textwell app using three modes: replace, insert, or add content. Integrate via MCP for efficient text operations in your workflow.

Instructions

Write text to Textwell application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoreplace: overwrite all, insert: at cursor, add: at endreplace
textYesContent to write to Textwell

Implementation Reference

  • Handler function for the 'write-text' tool. Extracts text and mode from arguments, logs the action, constructs a URL using URL_SCHEMES[mode], encodes the text, and executes it via executeUrlScheme. Returns success message or throws error.
    case 'write-text': {
      const { text, mode = 'replace' } = request.params.arguments as {
        text: string;
        mode?: 'replace' | 'insert' | 'add';
      };
      
      this.server.sendLoggingMessage({
        level: "info",
        data: `Textwell: ${mode} text`
      });
      
      const encodedText = encodeURIComponent(text);
      const url = `${URL_SCHEMES[mode]}?text=${encodedText}`;
      
      try {
        await this.executeUrlScheme(url);
        return {
          content: [{
            type: 'text',
            text: `Text ${mode} completed`
          }]
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Textwell write failed: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • Input schema definition for the 'write-text' tool, including required 'text' parameter and optional 'mode' with enum values.
    inputSchema: {
      type: 'object',
      properties: {
        text: {
          type: 'string',
          description: 'Content to write to Textwell'
        },
        mode: {
          type: 'string',
          enum: ['replace', 'insert', 'add'],
          description: 'replace: overwrite all, insert: at cursor, add: at end',
          default: 'replace'
        }
      },
      required: ['text']
    }
  • src/server.ts:63-83 (registration)
    Registration of the 'write-text' tool in the ListToolsRequestSchema handler, providing name, description, and input schema.
      {
        name: 'write-text',
        description: 'Write text to Textwell application',
        inputSchema: {
          type: 'object',
          properties: {
            text: {
              type: 'string',
              description: 'Content to write to Textwell'
            },
            mode: {
              type: 'string',
              enum: ['replace', 'insert', 'add'],
              description: 'replace: overwrite all, insert: at cursor, add: at end',
              default: 'replace'
            }
          },
          required: ['text']
        }
      }
    ]
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Write text' which implies a mutation operation, but fails to describe permissions needed, side effects, error conditions, or response format. This leaves significant gaps for a tool that modifies application state.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and gets straight to the point without unnecessary elaboration.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after writing, error handling, or important behavioral aspects. The combination of missing annotations and minimal description creates significant gaps in understanding.

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 schema has 100% description coverage, with both parameters well-documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the structured schema, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Write text') and target ('to Textwell application'), providing a specific verb+resource combination. However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It simply states what the tool does without any usage context 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

Related 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/worldnine/textwell-mcp'

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