Skip to main content
Glama

rotate_api_key

Generate a new workspace API key and invalidate the current one to maintain security. Update integrations and restart the server with the new key immediately.

Instructions

Generate a new workspace API key and immediately invalidate the current one.

WARNING: This action is irreversible. The moment this succeeds, the key used to call it stops working. All integrations must be updated with the new key immediately, and this MCP server must be restarted with the new BITSCALE_API_KEY environment variable.

Returns: {"api_key": "sk-live-newkey..."} — the new workspace API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:305-318 (handler)
    Handler implementation for the rotate_api_key MCP tool.
    @mcp.tool()
    def rotate_api_key() -> str:
        """
        Generate a new workspace API key and immediately invalidate the current one.
    
        WARNING: This action is irreversible. The moment this succeeds, the key
        used to call it stops working. All integrations must be updated with the
        new key immediately, and this MCP server must be restarted with the new
        BITSCALE_API_KEY environment variable.
    
        Returns: {"api_key": "sk-live-newkey..."} — the new workspace API key.
        """
        data = _post("/api-key/rotate")
        return json.dumps(data, indent=2)
Behavior5/5

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

With no annotations provided, the description carries full disclosure burden and excellently covers irreversibility, immediate authentication impact (current key stops working), downstream infrastructure requirements (MCP server restart with new BITSCALE_API_KEY), and exact return value format.

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?

Three dense sentences with clear structure: purpose statement, WARNING block for critical side effects, and Returns specification. Every sentence earns its place with zero redundancy.

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

Completeness5/5

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

For a high-impact authentication operation with no input parameters, the description fully covers critical context: the irreversible state change, immediate operational impact, required remediation steps, and output format.

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

Parameters4/5

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

The input schema has 0 parameters, meeting the baseline expectation of 4. The description appropriately focuses on operational implications rather than input parameters, appropriately omitting parameter discussion where none exist.

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 specific action (generating a new API key and invalidating the current one) on a specific resource (workspace API key). The destructive/irreversible nature immediately distinguishes it from the read-only siblings (get_grid_curl, list_grids, etc.).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The WARNING block provides strong implicit guidance on when not to use this (unless prepared for immediate integration updates and server restart) and describes operational prerequisites. It could explicitly state the security scenario (e.g., 'use when rotating compromised keys') for a perfect score.

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/featherflow/bitscale-mcp'

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