Skip to main content
Glama
yvanfreitas

MCP Test Server

by yvanfreitas

get_user

Retrieve user details by ID from the MCP Test Server's user management system. Provide the user ID to access specific user information.

Instructions

Get a specific user by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser ID

Implementation Reference

  • The core handler function that retrieves a specific user by ID from the mock users data and returns success or error response.
    static getById(id) {
      const user = users.find(u => u.id === id);
      
      if (!user) {
        return {
          success: false,
          message: 'User not found'
        };
      }
    
      return {
        success: true,
        data: user
      };
    }
  • Input schema definition for the 'get_user' tool, specifying a required numeric 'id' parameter.
    {
      name: 'get_user',
      description: 'Get a specific user by ID',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'number',
            description: 'User ID'
          }
        },
        required: ['id']
      }
    },
  • mcp-server.js:56-57 (registration)
    Tool call dispatcher that maps 'get_user' requests to the UserService.getById handler.
    case 'get_user':
      return createMcpResponse(UserService.getById(args.id));
  • mcp-server.js:38-46 (registration)
    Registers the list tools handler which includes the 'get_user' schema from userToolSchemas.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          ...userToolSchemas,
          ...taskToolSchemas,
          searchToolSchema
        ]
      };
    });
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 states it retrieves a user by ID but doesn't mention whether this requires authentication, what happens if the ID doesn't exist (e.g., error handling), or the format of the return data. This leaves significant gaps for a read operation.

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 front-loads the core purpose ('Get a specific user by ID') with zero wasted words. It's appropriately sized for a simple retrieval tool.

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 tool's simplicity (one parameter, no output schema, no annotations), the description is minimal. It lacks context on authentication needs, error cases, or return format, which are important for a read operation. While concise, it doesn't provide enough completeness for reliable agent use.

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 'id' documented as 'User ID' in the schema. The description adds no additional meaning beyond this, such as ID format or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 ('Get') and resource ('a specific user by ID'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_users' (plural) or 'search', which might also retrieve user information, so it doesn't achieve full sibling differentiation.

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 like 'get_users' (for multiple users) or 'search' (for broader queries). It lacks explicit when/when-not instructions or named alternatives, leaving usage context implied at best.

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/yvanfreitas/MCP-test'

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