Skip to main content
Glama
cbinsights

CB Insights MCP Server

Official
by cbinsights

ChatCBI

Read-only

Query CB Insights' conversational AI to analyze business intelligence data through specific, clear questions, maintaining context across interactions.

Instructions

When using this tool, provide clear, specific queries for the best results. You can continue conversations with ChatCBI by including the chat ID from previous interaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
chat_idNo

Implementation Reference

  • server.py:46-72 (handler)
    The ChatCBI tool handler, decorated with @mcp.tool, which authenticates, constructs the API request to /chatcbi endpoint, and returns the response content.
    @mcp.tool(name="ChatCBI",
              description="When using this tool, provide clear, specific queries for the best results. You can continue conversations with ChatCBI by including the chat ID from previous interaction.",
              annotations=ToolAnnotations(title="Chat with CBI", readOnlyHint=True, openWorldHint=True),
              structured_output=False,
              )
    def chat_with_cbi(message: str, chat_id: Optional[str] = None) -> {}:
        token = get_auth_token()
    
        url = f"{API_BASE}/chatcbi"
        headers = {
            "Authorization": f"Bearer {token}",
            "Content-Type": "application/json"
        }
    
        payload = {"message": message}
        if chat_id:
            payload["chatID"] = chat_id
    
        with httpx.Client() as client:
            try:
                response = client.post(url, headers=headers, json=payload, timeout=TIMEOUT)
                response.raise_for_status()
                return response.content
            except Exception as e:
                raise Exception(e)
    
        return {}
  • Helper function to obtain authentication token from CB Insights API, used by the ChatCBI handler.
    def get_auth_token() -> str:
        url = f"{API_BASE}/authorize"
    
        payload = {
            "clientId": CLIENT_ID,
            "clientSecret": CLIENT_SECRET
        }
    
        with httpx.Client() as client:
            try:
                response = client.post(url, json=payload, timeout=30.0)
                response.raise_for_status()
                return response.json()["token"]
            except Exception as e:
                raise Exception(f"Failed to authenticate: {str(e)}")
  • server.py:46-50 (registration)
    Registration of the ChatCBI tool via @mcp.tool decorator, specifying name, description, annotations, and output settings.
    @mcp.tool(name="ChatCBI",
              description="When using this tool, provide clear, specific queries for the best results. You can continue conversations with ChatCBI by including the chat ID from previous interaction.",
              annotations=ToolAnnotations(title="Chat with CBI", readOnlyHint=True, openWorldHint=True),
              structured_output=False,
              )
  • Function signature defining input schema: message (str, required), chat_id (Optional[str]), output as dict.
    def chat_with_cbi(message: str, chat_id: Optional[str] = None) -> {}:
Behavior4/5

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

Annotations provide readOnlyHint=true and openWorldHint=true, indicating safe read operations with open-ended capabilities. The description adds valuable context about chat continuation (multi-turn conversations) and query specificity requirements, which goes beyond what annotations provide. No contradiction with annotations exists.

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 appropriately concise with two focused sentences. The first sentence provides usage advice, the second explains chat continuation. No wasted words, though it could be more front-loaded with the tool's purpose.

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 chat tool with 2 parameters, 0% schema coverage, no output schema, and no sibling tools, the description is insufficient. It doesn't explain what the tool does, what 'CBI' refers to, expected response format, or error conditions. The annotations help but don't compensate for the description's gaps.

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?

With 0% schema description coverage, the description must compensate but fails to explain parameter meanings. It mentions 'chat_id' for continuing conversations, giving some context for that parameter, but doesn't explain what 'message' represents or its format. The description adds minimal value beyond the bare schema.

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 fails to state what the tool actually does - it only provides usage advice ('provide clear, specific queries') and mentions chat continuation capability. The name 'ChatCBI' suggests a conversational interface, but the description doesn't explicitly state this is a chat/query tool. It's tautological in that it mentions 'using this tool' without explaining its function.

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

Usage Guidelines3/5

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

The description provides some usage guidance about query specificity and chat continuation, but doesn't explain when to use this tool versus alternatives (though there are no sibling tools). It mentions including chat_id for continuing conversations, which gives context about multi-turn interactions, but lacks explicit when/when-not guidance.

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/cbinsights/cbi-mcp-server'

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