Skip to main content
Glama
flyanima

Open Search MCP

by flyanima

jsonplaceholder_albums

Retrieve test album data from JSONPlaceholder for development and testing purposes, filtering by user ID and limiting results as needed.

Instructions

Get test albums data from JSONPlaceholder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNoUser ID to get albums for (1-10, optional)
limitNoMaximum number of albums to return (1-100)

Implementation Reference

  • The execute handler function that calls the API client to fetch albums data and formats the response.
    execute: async (args: any) => {
      try {
        const albums = await client.getAlbums(args.userId, args.limit || 10);
        
        return {
          success: true,
          data: {
            source: 'JSONPlaceholder API',
            type: 'albums',
            userId: args.userId,
            results: albums,
            count: albums.length,
            timestamp: Date.now(),
            apiUsed: true
          }
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Failed to get test albums'
        };
      }
    }
  • Full tool registration block defining name, description, input schema, and execute handler.
    registry.registerTool({
      name: 'jsonplaceholder_albums',
      description: 'Get test albums data from JSONPlaceholder',
      category: 'testing',
      source: 'jsonplaceholder.typicode.com',
      inputSchema: {
        type: 'object',
        properties: {
          userId: {
            type: 'number',
            description: 'User ID to get albums for (1-10, optional)'
          },
          limit: {
            type: 'number',
            description: 'Maximum number of albums to return (1-100)',
            default: 10,
            minimum: 1,
            maximum: 100
          }
        },
        required: []
      },
      execute: async (args: any) => {
        try {
          const albums = await client.getAlbums(args.userId, args.limit || 10);
          
          return {
            success: true,
            data: {
              source: 'JSONPlaceholder API',
              type: 'albums',
              userId: args.userId,
              results: albums,
              count: albums.length,
              timestamp: Date.now(),
              apiUsed: true
            }
          };
        } catch (error) {
          return {
            success: false,
            error: error instanceof Error ? error.message : 'Failed to get test albums'
          };
        }
      }
    });
  • Helper method in JSONPlaceholderAPIClient class that constructs the API endpoint and fetches albums data.
    async getAlbums(userId?: number, limit?: number) {
      const endpoint = userId ? `/users/${userId}/albums` : '/albums';
      const albums = await this.makeRequest(endpoint);
      return limit ? albums.slice(0, limit) : albums;
    }
  • Zod input validation schema specific to the jsonplaceholder_albums tool.
    'jsonplaceholder_albums': z.object({
      userId: z.number().int().min(1).max(10).optional(),
      limit: z.number().int().min(1).max(100).optional().default(10)
    }),
  • src/index.ts:245-245 (registration)
    Top-level call to register the JSONPlaceholder tools including jsonplaceholder_albums.
    registerJSONPlaceholderTools(this.toolRegistry);    // 2 tools: test_jsonplaceholder, test_httpbin
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get test albums data', implying a read-only operation, but fails to describe any behavioral traits such as rate limits, authentication needs, or what 'test' entails (e.g., mock data, no persistence). This leaves significant gaps in understanding the tool's behavior.

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 without any unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, return values, or error handling. For a tool with parameters and no structured safety hints, this minimal description does not provide enough context 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?

The input schema has 100% description coverage, documenting both parameters ('userId' and 'limit') with details like optionality, ranges, and defaults. The description adds no additional meaning beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Get test albums data from JSONPlaceholder', which provides a clear verb ('Get') and resource ('test albums data'). However, it doesn't differentiate from sibling tools like 'jsonplaceholder_posts' or 'jsonplaceholder_users' beyond specifying 'albums', making it somewhat vague about its specific scope compared to alternatives.

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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention any context, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name alone 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/flyanima/open-search-mcp'

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