Skip to main content
Glama
paladini

devutils-mcp-server

case_convert

Convert strings between casing styles like camelCase, snake_case, kebab-case, and others to standardize text formatting in code and documents.

Instructions

Convert a string between different casing styles: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe string to convert
toYesTarget case style

Implementation Reference

  • Registration and implementation of the 'case_convert' MCP tool.
    server.tool(
      "case_convert",
      "Convert a string between different casing styles: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and more.",
      {
        input: z.string().describe("The string to convert"),
        to: z
          .enum([
            "camelCase",
            "PascalCase",
            "snake_case",
            "kebab-case",
            "CONSTANT_CASE",
            "Title Case",
            "lowercase",
            "UPPERCASE",
          ])
          .describe("Target case style"),
      },
      async ({ input, to }) => {
        // Tokenize: split on spaces, hyphens, underscores, and camelCase boundaries
        const words = input
          .replace(/([a-z])([A-Z])/g, "$1 $2")
          .replace(/[_\-]+/g, " ")
          .split(/\s+/)
          .filter((w) => w.length > 0)
          .map((w) => w.toLowerCase());
    
        let result: string;
        switch (to) {
          case "camelCase":
            result = words
              .map((w, i) =>
                i === 0 ? w : w.charAt(0).toUpperCase() + w.slice(1)
              )
              .join("");
            break;
          case "PascalCase":
            result = words
              .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
              .join("");
            break;
          case "snake_case":
            result = words.join("_");
            break;
          case "kebab-case":
            result = words.join("-");
            break;
          case "CONSTANT_CASE":
            result = words.join("_").toUpperCase();
            break;
          case "Title Case":
            result = words
              .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
              .join(" ");
            break;
          case "lowercase":
            result = words.join(" ");
            break;
          case "UPPERCASE":
            result = words.join(" ").toUpperCase();
            break;
          default:
            result = input;
        }
    
        return { content: [{ type: "text" as const, text: result }] };
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It specifies supported casing styles comprehensively, but omits details about edge case handling (e.g., special characters, whitespace conversion rules) or output format specifics.

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?

Single sentence format that immediately declares functionality and provides concrete examples. No redundant text or unnecessary verbosity; information density is optimal.

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?

For a simple 2-parameter utility with complete schema documentation, the description is appropriately complete. It covers the transformation scope adequately, though explicit mention of return value semantics would strengthen it given the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing a baseline of 3. The description adds value by enumerating the specific case style examples (camelCase, PascalCase, etc.) which aids in quick comprehension of the 'to' parameter's domain beyond the schema's 'Target case style' label.

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 action (convert) and resource (string casing styles) with specific examples that distinguish it from encoding siblings like base64_encode or hash_sha256. The scope is precisely defined.

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 defines capabilities rather than usage context. While when to use case conversion is implied by the clear purpose (as opposed to hashing or encoding), there are no explicit guidelines distinguishing it from text transformation siblings like slugify.

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/paladini/devutils-mcp-server'

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