Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

find_release_in_user_collection

Locate a specific music release in a user's Discogs collection by providing the username and release ID.

Instructions

Find a release in a user's collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYes
release_idYes
pageNo
per_pageNo
sortNo
sort_orderNo

Implementation Reference

  • MCP tool handler for 'find_release_in_user_collection'. It instantiates a UserService and delegates to its collection.findRelease method, returning the JSON-stringified result or formatted error.
    export const findReleaseInUserCollectionTool: Tool<
      FastMCPSessionAuth,
      typeof UserCollectionReleaseParamsSchema
    > = {
      name: 'find_release_in_user_collection',
      description: `Find a release in a user's collection`,
      parameters: UserCollectionReleaseParamsSchema,
      execute: async (args) => {
        try {
          const userService = new UserService();
          const releases = await userService.collection.findRelease(args);
    
          return JSON.stringify(releases);
        } catch (error) {
          throw formatDiscogsError(error);
        }
      },
    };
  • Zod input schema for the tool parameters, merging UsernameInputSchema, ReleaseIdParamSchema (release_id), and QueryParamsSchema for pagination/search.
    export const UserCollectionReleaseParamsSchema = UsernameInputSchema.merge(
      ReleaseIdParamSchema.merge(QueryParamsSchema()),
    );
  • Registration function that adds the findReleaseInUserCollectionTool (line 326) along with other user collection tools to the FastMCP server.
    export function registerUserCollectionTools(server: FastMCP): void {
      server.addTool(getUserCollectionFoldersTool);
      server.addTool(createUserCollectionFolderTool);
      server.addTool(getUserCollectionFolderTool);
      server.addTool(editUserCollectionFolderTool);
      server.addTool(deleteUserCollectionFolderTool);
      server.addTool(findReleaseInUserCollectionTool);
      server.addTool(getUserCollectionItemsTool);
      server.addTool(addReleaseToUserCollectionFolderTool);
      server.addTool(rateReleaseInUserCollectionTool);
      server.addTool(moveReleaseInUserCollectionTool);
      server.addTool(deleteReleaseFromUserCollectionFolderTool);
      server.addTool(getUserCollectionCustomFieldsTool);
      server.addTool(editUserCollectionCustomFieldValueTool);
      server.addTool(getUserCollectionValueTool);
    }
  • Core helper method in UserCollectionService that performs the Discogs API GET request to /{username}/collection/releases/{release_id} with query parameters, validates the paginated response, and handles errors.
    async findRelease({
      username,
      release_id,
      ...options
    }: UserCollectionReleaseParams): Promise<UserCollectionItemsByRelease> {
      try {
        const response = await this.request<UserCollectionItemsByRelease>(
          `/${username}/collection/releases/${release_id}`,
          {
            params: options,
          },
        );
    
        // Validate the response using Zod schema
        const validatedResponse = UserCollectionItemsByReleaseSchema.parse(response);
        return validatedResponse;
      } catch (error) {
        if (isDiscogsError(error)) {
          throw error;
        }
    
        // For unexpected errors, wrap them
        throw new Error(`Failed to find release in collection: ${String(error)}`);
      }
    }
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 mentions 'Find' but doesn't disclose behavioral traits such as read-only vs. mutative nature, authentication requirements, rate limits, or what happens on failure (e.g., if release not found). This leaves critical gaps for a tool with 6 parameters.

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 with zero waste—it directly states the tool's function without fluff. It's 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 the complexity (6 parameters, no annotations, no output schema), the description is incomplete. It doesn't cover parameter semantics, behavioral context, or output expectations, making it inadequate for effective tool selection and invocation by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It only implies 'username' and 'release_id' usage but doesn't explain the purpose of 'page', 'per_page', 'sort', or 'sort_order' parameters. This fails to add meaning beyond the bare schema, leaving most parameters undocumented.

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 'Find a release in a user's collection' clearly states the verb ('Find') and resource ('release in a user's collection'), but it's vague about scope and doesn't distinguish from siblings like 'get_user_collection_items' or 'get_user_collection_folder'. It specifies the target but lacks detail on what 'find' entails (e.g., exact match, search, or retrieval).

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. With siblings like 'get_user_collection_items' (likely lists items) and 'get_user_collection_folder' (folder-specific), the description doesn't clarify if this tool is for exact lookups, filtering, or pagination, 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/cswkim/discogs-mcp-server'

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