Skip to main content
Glama
devhub

DevHub CMS MCP

Official
by devhub

get_locations

Retrieve all business locations with addresses, coordinates, and URLs for use in DevHub CMS content management.

Instructions

Get all locations for a business

Returns a list of locations with the following fields:
- id: Location ID that can be used in the other tools
- location_name: Location name
- location_url: Location URL in DevHub
- street: Street address
- city: City
- state: State
- country: Country
- postal_code: Postal code
- lat: Latitude
- lon: Longitude

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
business_idYes

Implementation Reference

  • The primary handler for the 'get_locations' MCP tool. It is registered via the @mcp.tool() decorator in FastMCP. The function retrieves locations for a given business_id from the DevHub API, formats them into a list of dicts with specified fields, and returns it. The docstring provides the input/output schema details.
    @mcp.tool()
    def get_locations(business_id: int) -> list:
        """Get all locations for a business
    
        Returns a list of locations with the following fields:
        - id: Location ID that can be used in the other tools
        - location_name: Location name
        - location_url: Location URL in DevHub
        - street: Street address
        - city: City
        - state: State
        - country: Country
        - postal_code: Postal code
        - lat: Latitude
        - lon: Longitude
        """
        client, base_url = get_client()
        params = {
            'business_id': business_id,
            'limit': 600,
            'order_by': 'location_name',
        }
        r = client.get('{}locations/'.format(base_url), params=params)
        content = json.loads(r.content)
        return [{
            'id': location['id'],
            'location_name': location['location_name'],
            'location_url': location['location_url'],
            'street': location['street'],
            'city': location['city'],
            'state': location['state'],
            'country': location['country'],
            'postal_code': location['postal_code'],
            'lat': location['lat'],
            'lon': location['lon'],
        } for location in content['objects']]
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns a list of locations with specific fields, which is helpful, but lacks critical details such as whether it's read-only (implied by 'Get' but not explicit), pagination behavior, error handling, authentication needs, or rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a structured list of return fields. Every sentence earns its place by adding value, with no redundant or verbose language, making it efficient and easy to parse.

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's low complexity (1 parameter, no output schema, no annotations), the description is moderately complete. It explains the purpose and return fields adequately, but lacks details on behavioral aspects like error handling or usage context. Without annotations or an output schema, it should do more to compensate, but it covers the basics for a simple read operation.

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 1 parameter (business_id) with 0% description coverage, so the description must compensate. It adds meaning by clarifying that locations are retrieved 'for a business', implicitly explaining the business_id parameter's role. However, it doesn't specify format constraints or examples, leaving some ambiguity. With 0 parameters documented in the schema, the baseline is 4, and the description partially meets this by providing contextual meaning.

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 locations for a business' specifies the verb ('Get') and resource ('locations'), with the scope ('for a business') distinguishing it from siblings like 'get_nearest_location' or 'get_businesses'. However, it doesn't explicitly differentiate from potential similar tools beyond the business context.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid business_id), exclusions, or comparisons to siblings like 'get_nearest_location' or 'get_businesses', leaving usage context implied at best.

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