Skip to main content
Glama
6

MCP Server RubyGems

by 6

get_owner_gems

Retrieve all RubyGems owned by a specific user or organization using the RubyGems API. Input the owner’s username to fetch a detailed list of associated gems.

Instructions

Get all RubyGems owned by a specific user or organization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
$schemaNo
additionalPropertiesNo
propertiesNo
requiredNo
typeNo

Implementation Reference

  • The MCP tool handler for 'get_owner_gems', which parses input arguments, fetches the gems using getOwnerGems, and returns the JSON-formatted result or an error response.
    handler: async (args: Record<string, unknown> | undefined) => {
      const { owner_name } = GetOwnerGemsInputSchema.parse(args || {});
    
      try {
        const ownerGems = await getOwnerGems(owner_name);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(ownerGems, null, 2),
            },
          ],
        };
      } catch (error: unknown) {
        return createErrorResponse(error, 'Failed to fetch gems for owner');
      }
    },
  • Core implementation that performs the HTTP fetch to RubyGems API for owner's gems and parses/validates the response using OwnerGemSchema.
    async function getOwnerGems(ownerName: string): Promise<OwnerGem[]> {
      const response = await fetch(
        `https://rubygems.org/api/v1/owners/${ownerName}/gems.json`
      );
    
      if (!response.ok) {
        if (response.status === 404) {
          throw new Error(`Owner '${ownerName}' not found`);
        }
        throw new Error(`Failed to fetch gems for owner: ${response.statusText}`);
      }
    
      const data = await response.json();
      return z.array(OwnerGemSchema).parse(data);
    }
  • Input schema for the tool using Zod, defining the required 'owner_name' parameter.
    const GetOwnerGemsInputSchema = z.object({
      owner_name: z
        .string()
        .min(1)
        .describe('Username of the RubyGem owner to fetch gems for'),
    });
  • Output schema defining the structure of each gem returned by the RubyGems API.
    const OwnerGemSchema = z.object({
      name: z.string(),
      downloads: z.number(),
      version: z.string(),
      version_downloads: z.number(),
      platform: z.string(),
      authors: z.string(),
      info: z.string(),
      licenses: z.array(z.string()).nullable(),
      project_uri: z.string(),
      gem_uri: z.string(),
      homepage_uri: z.string().nullable(),
      wiki_uri: z.string().nullable(),
      documentation_uri: z.string().nullable(),
      mailing_list_uri: z.string().nullable(),
      source_code_uri: z.string().nullable(),
      bug_tracker_uri: z.string().nullable(),
      funding_uri: z.string().nullable(),
    });
  • src/index.ts:13-27 (registration)
    Imports the getOwnerGemsTool and includes it in the tools array used by the MCP server for tool listing and calling.
    import { getOwnerGemsTool } from './tools/get_owner_gems.js';
    import { searchRubyGemsTool } from './tools/search_rubygems.js';
    import { type McpTool } from './tools/types.js';
    
    /**
     * Define the array of available tools
     */
    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. It states the tool fetches data ('Get all RubyGems'), implying a read-only operation, but doesn't cover critical aspects like rate limits, authentication needs, pagination, error handling, or what 'all' entails (e.g., completeness or limitations). For a tool with no annotations, this is a significant gap in transparency.

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 front-loaded and appropriately sized, making it easy for an agent 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 (5 parameters with 0% schema coverage, no annotations, no output schema), the description is incomplete. It doesn't address parameter details, return values, or behavioral traits, making it inadequate for the agent to fully understand how to use the tool effectively.

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?

The input schema has 5 parameters with 0% description coverage, and the description only mentions 'owner_name' implicitly ('specific user or organization'). It doesn't explain the other 4 parameters, their purposes, or how they interact. With low schema coverage, the description fails to compensate, leaving most parameters undocumented.

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 tool's purpose: 'Get all RubyGems owned by a specific user or organization.' It specifies the verb ('Get'), resource ('RubyGems'), and scope ('owned by a specific user or organization'). However, it doesn't explicitly differentiate from sibling tools like 'get_gem_owners' or 'search_rubygems,' which is why it doesn't achieve 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 'search_rubygems' for broader searches or 'get_gem_owners' for related queries, nor does it specify prerequisites or exclusions. This leaves the agent without clear usage context.

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