Skip to main content
Glama
6

MCP Server RubyGems

by 6

get_gem_owners

Retrieve ownership details for a specific RubyGem using the RubyGems.org API. Input the gem name to fetch its owners, aiding in package management and collaboration.

Instructions

Get the owners of a specific RubyGem

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
$schemaNo
additionalPropertiesNo
propertiesNo
requiredNo
typeNo

Implementation Reference

  • Core handler function that fetches the owners of a RubyGem from the RubyGems API and validates the response.
    async function getGemOwners(gemName: string): Promise<GemOwner[]> {
      const response = await fetch(
        `https://rubygems.org/api/v1/gems/${gemName}/owners.json`
      );
    
      if (!response.ok) {
        if (response.status === 404) {
          throw new Error(`RubyGem '${gemName}' not found`);
        }
        throw new Error(`Failed to fetch gem owners: ${response.statusText}`);
      }
    
      const data = await response.json();
      return z.array(GemOwnerSchema).parse(data);
    }
  • Input schema defining the gem_name parameter for the get_gem_owners tool.
    const GetGemOwnersInputSchema = z.object({
      gem_name: z
        .string()
        .min(1)
        .describe('Name of the RubyGem to fetch owners for'),
    });
  • Schema for individual gem owner objects used in the response validation.
    const GemOwnerSchema = z.object({
      id: z.number(),
      handle: z.string(),
      email: z.string().optional(),
    });
  • MCP tool registration including name, description, input schema conversion, and wrapper handler that parses input, calls the core handler, formats response, and handles errors.
    export const getGemOwnersTool: McpTool = {
      name: 'get_gem_owners',
      description: 'Get the owners of a specific RubyGem',
      inputSchema: {
        type: 'object',
        properties: zodToJsonSchema(GetGemOwnersInputSchema),
      },
      handler: async (args: Record<string, unknown> | undefined) => {
        const { gem_name } = GetGemOwnersInputSchema.parse(args || {});
    
        try {
          const owners = await getGemOwners(gem_name);
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(owners, null, 2),
              },
            ],
          };
        } catch (error: unknown) {
          return createErrorResponse(error, 'Failed to fetch gem owners');
        }
      },
    };
  • src/index.ts:20-27 (registration)
    Registration of all tools including getGemOwnersTool in the server's tools array.
    const tools: readonly McpTool[] = [
      getRubyGemInfoTool,
      searchRubyGemsTool,
      getGemVersionsTool,
      getGemReverseDependenciesTool,
      getOwnerGemsTool,
      getGemOwnersTool,
    ] as const;
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. While 'Get' implies a read operation, it doesn't specify whether this requires authentication, rate limits, error conditions, or the format/structure of returned data. For a tool with zero annotation coverage, this leaves critical behavioral aspects undocumented.

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, clear sentence that efficiently conveys the core purpose without unnecessary words. It's appropriately sized for a simple tool and front-loads the essential information.

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, no output schema, and minimal schema description coverage, the description is incomplete. It doesn't address behavioral aspects (e.g., authentication needs), usage context relative to siblings, or details about the return value, leaving the agent with insufficient information for reliable tool invocation.

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 description mentions 'a specific RubyGem,' which aligns with the single parameter 'gem_name' in the schema. However, with 0% schema description coverage (the schema's parameter description is minimal), the description adds little beyond what's inferred from the parameter name. It doesn't clarify constraints like valid gem name formats or examples.

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 ('owners of a specific RubyGem'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_owner_gems' (which appears to fetch gems owned by a user rather than owners of a gem), leaving room for potential confusion.

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. With siblings like 'get_rubygem_info' (which might include owner information) and 'get_owner_gems' (which has a related but inverse purpose), the lack of comparative context is a significant gap.

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

Related 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/6/mcp-server-rubygems'

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