Skip to main content
Glama

cb_generate_pattern

Generate a circuit breaker implementation to protect service-to-service calls. Specify calling service, target service, and language to receive ready-to-use code.

Instructions

Generate a circuit breaker implementation for service-to-service communication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoAPI key for authentication
languageYesProgramming language (e.g. typescript, go, python, java)
service_nameYesName of the calling service
target_serviceYesName of the target service to protect
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 does not state whether the tool writes files to the workspace, whether the api_key parameter implies a call to an external generation service, whether existing code is overwritten, or what the generated implementation includes (timeouts, half-open state, retries). The safety and side-effect profile is entirely undisclosed.

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?

A single front-loaded sentence with zero filler; the verb and object appear immediately. It is appropriately compact, though a short clause about output or side effects would have made the sentence do more work.

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?

For a code-generation tool with 4 parameters, no annotations, and no output schema, a one-line description is insufficient. The agent is left ignorant of the return format, the filesystem impact, authentication behavior tied to api_key, and whether the output is scaffold code, full implementation, or configuration. Sibling routing information is also absent.

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?

Schema description coverage is 100%, so the schema already documents all four parameters and the baseline of 3 applies. The description's 'service-to-service' phrasing loosely maps to service_name/target_service but adds no format, constraint, or usage detail beyond the schema.

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 states a specific verb ('Generate'), a concrete resource ('a circuit breaker implementation'), and a domain scope ('service-to-service communication'). It is clear about what is produced, but it does not differentiate from closely related siblings like retry_add_circuit_breaker or the cb_add_fallbacks/cb_configure_thresholds companions, leaving the naming family ambiguous.

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 given on when to choose this tool over alternatives. Given the sibling list contains retry_add_circuit_breaker (nearly identical in intent), cb_add_fallbacks, and cb_configure_thresholds, an agent has no basis to decide between them. No prerequisites, sequencing, or exclusions are mentioned either.

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/barnburner121/claude-plugin-marketplace'

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