Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

cr_list_images

Retrieve a list of container images stored in a given namespace and region of the IBM Cloud Container Registry.

Instructions

List container images in the registry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNo
regionNo

Implementation Reference

  • The handler function for the cr_list_images tool. It makes a GET request to the Container Registry API /v1/images endpoint, passing an optional namespace query parameter and the account ID header.
    server.tool("cr_list_images", "List container images in the registry", {
      namespace: z.string().optional(), region: z.string().optional(),
    }, async (p) => safeTool(async () => {
      const accountId = await acct();
      return client.request(`${api(p.region||r)}/v1/images`, {headers:{"Account":accountId},queryParams:{namespace:p.namespace}});
    }));
  • Input schema for cr_list_images defined inline using Zod: optional 'namespace' and 'region' string parameters.
    namespace: z.string().optional(), region: z.string().optional(),
  • Tool registration via server.tool() at line 35 in src/tools/container-registry/index.ts. Called from src/server.ts line 86 via registerContainerRegistryTools().
    server.tool("cr_list_images", "List container images in the registry", {
  • Endpoint helper: CONTAINER_REGISTRY_API builds the API base URL (e.g. https://us-south.icr.io/api) that is used by the handler.
    export const IBM_ENDPOINTS = {
      IAM: "https://iam.cloud.ibm.com",
  • The safeTool helper wraps the handler to catch errors and return proper MCP success/error responses.
    export async function safeTool<T>(fn: () => Promise<T>): Promise<ReturnType<typeof successContent> | ReturnType<typeof errorContent>> {
      try {
        const result = await fn();
        return successContent(result);
      } catch (error) {
        return errorContent(error);
      }
    }
Behavior1/5

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

No annotations provided; the description fails to disclose behavioral traits like whether it lists all images across namespaces/regions, pagination behavior, or authentication requirements. The description carries the full burden but provides none.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no verbose or redundant information. However, for such a short description, it could also be seen as under-specified; it is concise but not necessarily well-structured for completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description is insufficient. It does not mention the scope of images listed, return format, or any limitations. The tool has only 2 parameters, but the description does not leverage them to provide completeness.

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

Parameters1/5

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

The schema has 2 parameters (namespace, region) with 0% description coverage. The description adds no meaning beyond the schema; it does not explain how parameters affect the listing (e.g., filter by namespace).

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

Purpose5/5

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

The description clearly states the tool's action ('List container images') and resource ('the registry'), distinguishing it from siblings like cr_get_image (single image) and cr_list_namespaces (list namespaces).

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 on when to use this tool versus alternatives, such as cr_get_image for a specific image or cr_list_namespaces for namespaces. No context on filtering or prerequisites.

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/ahmedselimmansor-ctrl/IBM_cloud_MCP_SERVER'

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