Skip to main content
Glama
CodeDreamer06

MonkeyType MCP Server

check_username

Verify username availability on MonkeyType by checking if a desired username is already taken, enabling users to find available options.

Instructions

Check if a username is available on MonkeyType

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesUsername to check for availability

Implementation Reference

  • The switch case handler for the 'check_username' tool. It constructs parameters from the input args, calls the shared 'callMonkeyTypeApi' helper with the specific MonkeyType endpoint '/users/checkname' using GET method, and returns the JSON-stringified result as tool output.
    case "check_username": {
      const params = { name: args.name };
      const result = await callMonkeyTypeApi(`/users/checkname`, 'GET', apiKey, params);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod schema defining the input parameters for the 'check_username' tool: a required 'name' string representing the username to check.
    const CheckNameSchema = BaseApiSchema.extend({
      name: z.string().describe("Username to check for availability")
    });
  • server.js:163-167 (registration)
    Registration of the 'check_username' tool in the MCP server's listTools response, including name, description, and input schema derived from CheckNameSchema.
    {
      name: "check_username",
      description: "Check if a username is available on MonkeyType",
      inputSchema: zodToJsonSchema(CheckNameSchema),
    },
  • Shared helper function used by all tools, including 'check_username', to make authenticated HTTP requests to the MonkeyType API using axios, handling GET/POST, errors, and returning data or error objects.
    async function callMonkeyTypeApi(endpoint, method, apiKey, params = {}, data = null) {
      try {
        const headers = {
          'Authorization': `ApeKey ${apiKey}`,
          'Content-Type': 'application/json',
          'User-Agent': 'MonkeyType-MCP-Server/1.0.0'
        };
    
        const config = {
          headers,
          timeout: 30000,
          validateStatus: status => status < 500
        };
    
        if (method === 'GET' && Object.keys(params).length > 0) {
          config.params = params;
        }
    
        let response;
        if (method === 'GET') {
          response = await axios.get(`${MONKEYTYPE_API_BASE_URL}${endpoint}`, config);
        } else if (method === 'POST') {
          response = await axios.post(`${MONKEYTYPE_API_BASE_URL}${endpoint}`, data, config);
        }
    
        return response.data;
      } catch (error) {
        console.error(`Error calling MonkeyType API: ${error.message}`);
        if (error.response) {
          return { 
            error: error.response.data, 
            statusCode: error.response.status 
          };
        }
        return { 
          error: error.message 
        };
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what the tool does but doesn't disclose behavioral traits such as rate limits, authentication requirements, error responses, or whether it's a read-only operation. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 that directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value will be (e.g., boolean availability status, error messages for invalid usernames) or address potential edge cases. For a tool with no structured output documentation, more context is needed.

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 description coverage is 100%, with the single parameter 'name' fully documented in the schema. The description adds no additional parameter semantics beyond implying the parameter is a username. Baseline 3 is appropriate when the schema does the heavy lifting.

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 tool's purpose with a specific verb ('check') and resource ('username availability on MonkeyType'). It distinguishes from siblings by focusing on username validation rather than data retrieval or user actions. However, it doesn't explicitly differentiate from non-existent username-related siblings, keeping it at 4 rather than 5.

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. It doesn't mention prerequisites (e.g., whether the user needs to be logged in), or clarify if this is for new account creation versus existing username verification. With no usage context provided, this scores low.

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/CodeDreamer06/MonkeytypeMCP'

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