Skip to main content
Glama
op-enny
by op-enny

fakestore_get_users

Retrieve user data from the Fake Store API for testing or development. Filter results with limit and sort parameters to manage e-commerce user information.

Instructions

Get all users from the store. Optionally limit results and sort.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoLimit the number of users returned
sortNoSort users (asc or desc)

Implementation Reference

  • Core handler function that fetches users from the FakeStore API with optional limit and sort parameters. Performs input validation and constructs query parameters.
    export async function getAllUsers(args: { limit?: number; sort?: SortOrder }): Promise<User[]> {
      const { limit, sort } = args;
    
      if (limit !== undefined) {
        validateLimit(limit);
      }
      if (sort !== undefined) {
        validateSortOrder(sort);
      }
    
      const params: Record<string, unknown> = {};
      if (limit) params.limit = limit;
      if (sort) params.sort = sort;
    
      return get<User[]>('/users', params);
    }
  • Input schema definition for the fakestore_get_users tool, including properties for limit and sort.
    {
      name: 'fakestore_get_users',
      description: 'Get all users from the store. Optionally limit results and sort.',
      inputSchema: {
        type: 'object',
        properties: {
          limit: {
            type: 'number',
            description: 'Limit the number of users returned',
          },
          sort: {
            type: 'string',
            enum: ['asc', 'desc'],
            description: 'Sort users (asc or desc)',
          },
        },
      },
    },
  • MCP tool call handler that dispatches to getAllUsers and formats the JSON response.
    if (name === 'fakestore_get_users') {
      const result = await getAllUsers(args as { limit?: number; sort?: 'asc' | 'desc' });
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
  • src/index.ts:40-44 (registration)
    Registers all tools including userTools (with fakestore_get_users) for the ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [...productTools, ...cartTools, ...userTools],
      };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions optional limiting and sorting but lacks critical details like whether this is a read-only operation, potential rate limits, authentication requirements, or what format the returned users are in. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 perfectly concise at just two sentences. The first sentence establishes the core purpose, and the second efficiently covers the optional parameters. Every word serves a purpose with zero wasted text.

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 insufficiently complete. It doesn't explain what 'users' means in this context (what fields are returned), doesn't mention pagination or default behavior when parameters aren't provided, and provides no error handling information. For a tool with rich sibling context and no structured output documentation, this leaves too many questions unanswered.

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 ('limit' and 'sort') fully documented in the schema. The description adds minimal value by mentioning these options exist but doesn't provide additional semantic context beyond what's already in the structured schema fields.

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 all users') and resource ('from the store'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'fakestore_get_user' (singular) or 'fakestore_get_user_carts', which would require explicit differentiation for a perfect score.

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 sibling tools like 'fakestore_get_user' for retrieving a single user or 'fakestore_get_user_carts' for user-specific cart data, leaving the agent to infer usage context without explicit direction.

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/op-enny/mcp-server-fakestore'

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