Skip to main content
Glama
drdudda-org

My Little MCP Server

by drdudda-org

랜덤 숫자 생성

get_random_number

Generate a random number between 1 and 50, or customize the range from 1 to 100 for applications requiring random numeric values.

Instructions

1부터 50 사이의 랜덤한 숫자를 하나 뽑아주는 도구입니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
minNo최소값 (기본값: 1)
maxNo최대값 (기본값: 50)

Implementation Reference

  • The MCP tool handler that calls the random number generator helper and formats the response as text content.
    async ({ min = 1, max = 50 }) => {
      const randomNumber = getRandomNumber(min, max);
      return {
        content: [{ 
          type: "text", 
          text: `랜덤 숫자 (${min}~${max}): ${randomNumber}` 
        }]
      };
    }
  • Input schema using Zod for validating min and max parameters with descriptions.
    inputSchema: {
      min: z.number().min(1).max(100).optional().describe("최소값 (기본값: 1)"),
      max: z.number().min(1).max(100).optional().describe("최대값 (기본값: 50)")
    }
  • src/index.ts:77-96 (registration)
    Registration of the 'get_random_number' tool using server.registerTool, including title, description, input schema, and handler.
    server.registerTool(
      "get_random_number",
      {
        title: "랜덤 숫자 생성",
        description: "1부터 50 사이의 랜덤한 숫자를 하나 뽑아주는 도구입니다.",
        inputSchema: {
          min: z.number().min(1).max(100).optional().describe("최소값 (기본값: 1)"),
          max: z.number().min(1).max(100).optional().describe("최대값 (기본값: 50)")
        }
      },
      async ({ min = 1, max = 50 }) => {
        const randomNumber = getRandomNumber(min, max);
        return {
          content: [{ 
            type: "text", 
            text: `랜덤 숫자 (${min}~${max}): ${randomNumber}` 
          }]
        };
      }
    );
  • Utility function that generates a random integer between min and max (clamped to 1-100), used by the tool handler.
    function getRandomNumber(min: number = 1, max: number = 50): number {
      // Ensure min and max are within bounds
      min = Math.max(1, Math.min(min, 100));
      max = Math.max(1, Math.min(max, 100));
      
      // Ensure min <= max
      if (min > max) {
        [min, max] = [max, min];
      }
      
      return Math.floor(Math.random() * (max - min + 1)) + min;
    }
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. While it states the basic function (generating a random number between 1-50), it doesn't disclose important behavioral traits like whether the number generation is truly random or pseudorandom, whether there are rate limits, what happens if min/max parameters conflict, or what format the output takes. The description is minimal and lacks behavioral context.

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 gets straight to the point with zero wasted words. It's appropriately sized for this simple tool and front-loads the essential information about what the tool does and its default range.

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

Completeness3/5

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

For a simple random number generator with 2 optional parameters and 100% schema coverage, the description is adequate but has clear gaps. Without annotations or an output schema, the description should ideally provide more context about the randomness quality, output format, and usage scenarios. It meets minimum viability but doesn't fully compensate for the lack of structured metadata.

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 description coverage is 100%, with both parameters (min, max) fully documented in the schema. The description doesn't add any parameter semantics beyond what's already in the schema - it only mentions the 1-50 range which corresponds to the default values. According to the rules, when schema coverage is high (>80%), the baseline is 3 even with no additional param info in the description.

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 specific action ('랜덤한 숫자를 하나 뽑아주는' - picks one random number) and resource ('1부터 50 사이' - between 1 and 50). It distinguishes from the sibling tool get_current_time by focusing on random number generation rather than time retrieval. The purpose is specific and unambiguous.

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 the sibling tool get_current_time or any other potential alternatives for generating numbers or randomness. There's no context about when this tool is appropriate versus other approaches.

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/drdudda-org/my-little-mcp'

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