Skip to main content
Glama

get_api_key_information

Retrieve detailed API key information from the Bybit Server to monitor permissions, restrictions, and usage. Essential for managing and verifying API access securely.

Instructions

Get API key information

Returns:
    Dict: API key information

Example:
    get_api_key_information()

Reference:
    https://bybit-exchange.github.io/docs/v5/user/apikey-info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary MCP tool handler for 'get_api_key_information', decorated with @mcp.tool(). It invokes the service method, processes the response, and handles errors by checking retCode and exceptions.
    def get_api_key_information() -> Dict:
        """
        Get API key information
    
        Returns:
            Dict: API key information
    
        Example:
            get_api_key_information()
    
        Reference:
            https://bybit-exchange.github.io/docs/v5/user/apikey-info
        """
        try:
            result = bybit_service.get_api_key_information()
            if result.get("retCode") != 0:
                logger.error(f"Failed to get API key information: {result.get('retMsg')}")
                return {"error": result.get("retMsg")}
            return result
        except Exception as e:
            logger.error(f"Failed to get API key information: {e}", exc_info=True)
            return {"error": str(e)}
  • Helper method in BybitService class that directly calls the underlying client library's get_api_key_information() method to fetch the API key details.
    def get_api_key_information(self) -> Dict:
        """
        Get API key information
    
        Returns:
            Dict: API key information
        """
        return self.client.get_api_key_information()
  • src/server.py:647-647 (registration)
    The tool is listed in the MCP prompt template as an available tool, indicating its registration via the @mcp.tool() decorator.
    - get_api_key_information() - Get API key information: Retrieve API key information.
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it returns API key information without disclosing behavioral traits such as authentication requirements, rate limits, or what specific data is included. It lacks details on permissions, response format, or any constraints, making it insufficient for a tool that likely involves sensitive data.

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

Conciseness3/5

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

The description is structured with sections (Returns, Example, Reference) but includes redundant elements like 'Returns: Dict: API key information' which adds little value. It's somewhat front-loaded but could be more efficient by eliminating tautological statements and focusing on unique aspects.

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 no annotations and no output schema, the description is incomplete for a tool handling API key information. It fails to explain what the returned dict contains, authentication needs, or how it differs from siblings. For a potentially sensitive operation, more context on behavior and output is necessary.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter information is needed. The description correctly indicates no parameters with the example 'get_api_key_information()', aligning with the schema. A baseline of 4 is appropriate as it doesn't need to compensate for any parameter gaps.

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

Purpose2/5

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

The description restates the tool name ('Get API key information') without adding specificity about what information is retrieved or distinguishing it from sibling tools like 'get_access_key' or 'get_secret_key'. It's a tautology that doesn't clarify the scope or content of the returned information beyond the obvious.

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 provided on when to use this tool versus alternatives like 'get_access_key' or 'get_secret_key'. The example shows usage but doesn't explain context, prerequisites, or differentiation from sibling tools, leaving the agent without usage direction.

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/dlwjdtn535/mcp-bybit-server'

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