Skip to main content
Glama
devhub

DevHub CMS MCP

Official
by devhub

get_businesses

Retrieve all businesses from your DevHub account to obtain business IDs and names for use with other CMS tools.

Instructions

Get all businesses within the DevHub account

Returns a list of businesses with the following fields:
- id: Business ID that can be used in the other tools
- business_name: Business name

If only one business exists in the account, you can assume that the user wants to use that business for any business_id related tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_businesses' tool, decorated with @mcp.tool() for registration. It fetches a list of businesses from the DevHub API using OAuth1Session, with parameters to filter non-deleted businesses ordered by name.
    @mcp.tool()
    def get_businesses() -> list:
        """Get all businesses within the DevHub account
    
        Returns a list of businesses with the following fields:
        - id: Business ID that can be used in the other tools
        - business_name: Business name
    
        If only one business exists in the account, you can assume that the user wants to use that business for any business_id related tools.
        """
        client, base_url = get_client()
        params = {
            'deleted': 0,
            'limit': 20,
            'order_by': 'business_name',
            'project_type': 'default',
        }
        r = client.get('{}businesses/'.format(base_url), params=params)
        content = json.loads(r.content)
        return content['objects']
  • The @mcp.tool() decorator registers the get_businesses function as an MCP tool.
    @mcp.tool()
  • Function signature and docstring defining no input parameters and list output for businesses.
    def get_businesses() -> list:
        """Get all businesses within the DevHub account
    
        Returns a list of businesses with the following fields:
        - id: Business ID that can be used in the other tools
        - business_name: Business name
    
        If only one business exists in the account, you can assume that the user wants to use that business for any business_id related tools.
        """
  • Helper function to create the OAuth1 client and base URL used by get_businesses.
    def get_client():
        """Get DevHub API client and base_url."""
        client = OAuth1Session(
            os.environ['DEVHUB_API_KEY'],
            client_secret=os.environ['DEVHUB_API_SECRET'])
        base_url = '{}/api/v2/'.format(os.environ['DEVHUB_BASE_URL'])
        return client, base_url
Behavior3/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. It discloses that the tool returns a list of businesses with specific fields (id and business_name), which is useful behavioral context. However, it lacks details on error handling, pagination, or rate limits, which are important for a read operation. The description doesn't contradict any annotations, but it's not fully comprehensive.

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 well-structured and concise, with three sentences that each add value: stating the purpose, detailing the return fields, and providing usage guidance. It's front-loaded with the core purpose. A minor point is that the second sentence could be more tightly integrated, but overall it's efficient with minimal waste.

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

Completeness3/5

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

Given the tool has no annotations, no output schema, and 0 parameters, the description does a decent job by explaining the return format and usage assumption. However, for a tool that returns data, more details on response structure (e.g., list format, error cases) would improve completeness. It's adequate but has clear gaps in behavioral context.

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 with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, which is correct. However, it doesn't add any extra semantic context beyond the schema, so it earns a baseline 4 for zero-parameter tools.

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 clearly states the tool's purpose: 'Get all businesses within the DevHub account.' It specifies the verb ('Get') and resource ('businesses'), and the scope ('within the DevHub account') is well-defined. However, it doesn't explicitly differentiate from sibling tools like 'get_locations' or 'get_nearest_location', which prevents a score of 5.

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 description provides clear usage context by stating 'If only one business exists in the account, you can assume that the user wants to use that business for any business_id related tools.' This gives practical guidance on when to use the tool's output. However, it doesn't specify when not to use it or name explicit alternatives among siblings, so it falls short of a 5.

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/devhub/devhub-cms-mcp'

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