Skip to main content
Glama
srafi26

MCP Server

by srafi26

uppercase

Convert text to uppercase for formatting needs. This tool transforms input text into all capital letters.

Instructions

Convert text to uppercase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to convert to uppercase

Implementation Reference

  • The handler logic for the 'uppercase' tool. It validates the 'text' input as a string and converts it to uppercase using toUpperCase() method.
    case 'uppercase': const text = validateString(args.text, 'text'); return { content: [ { type: 'text', text: text.toUpperCase(), } as TextContent, ], };
  • src/index.ts:44-57 (registration)
    Registration of the 'uppercase' tool in the tools array used for ListToolsRequestHandler.
    { name: 'uppercase', description: 'Convert text to uppercase', inputSchema: { type: 'object', properties: { text: { type: 'string', description: 'The text to convert to uppercase', }, }, required: ['text'], }, },
  • Input schema for the 'uppercase' tool defining the required 'text' parameter as a string.
    inputSchema: { type: 'object', properties: { text: { type: 'string', description: 'The text to convert to uppercase', }, }, required: ['text'], },
  • Helper function used in the 'uppercase' handler to validate the input 'text' is a string.
    const validateString = (value: unknown, fieldName: string): string => { if (typeof value !== 'string') { throw new Error(`${fieldName} must be a string`); } return value; };
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/srafi26/mcp-server'

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