Skip to main content
Glama
devhub

DevHub CMS MCP

Official
by devhub

get_hours_of_operation

Retrieve operating hours for DevHub CMS locations, showing daily schedules including multiple time ranges for breaks and closed days.

Instructions

Get the hours of operation for a DevHub location

Returns a list of items representing days of the week

Except for the special case formatting, this object is a list of 7 items which represent each day.

Each day can can have one-four time ranges. For example, two time ranges denotes a "lunch-break". No time ranges denotes closed.

Examples:
9am-5pm [["09:00:00", "17:00:00"]]
9am-12pm and 1pm-5pm [["09:00:00", "12:00:00"], ["13:00:00", "17:00:00"]]
Closed - an empty list []

Args:
    location_id: DevHub Location ID
    hours_type: Defaults to 'primary' unless the user specifies a different type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
location_idYes
hours_typeNoprimary

Implementation Reference

  • The main handler function for the 'get_hours_of_operation' tool, decorated with @mcp.tool() for registration. The docstring defines the input schema and output format. It fetches location data from DevHub API using get_client() helper and extracts hours.
    @mcp.tool()
    def get_hours_of_operation(location_id: int, hours_type: str = 'primary') -> list:
        """Get the hours of operation for a DevHub location
    
        Returns a list of items representing days of the week
    
        Except for the special case formatting, this object is a list of 7 items which represent each day.
    
        Each day can can have one-four time ranges. For example, two time ranges denotes a "lunch-break". No time ranges denotes closed.
    
        Examples:
        9am-5pm [["09:00:00", "17:00:00"]]
        9am-12pm and 1pm-5pm [["09:00:00", "12:00:00"], ["13:00:00", "17:00:00"]]
        Closed - an empty list []
    
        Args:
            location_id: DevHub Location ID
            hours_type: Defaults to 'primary' unless the user specifies a different type
        """
        client, base_url = get_client()
        r = client.get('{}locations/{}'.format(base_url, location_id))
        content = json.loads(r.content)
        return content['hours_by_type'].get(hours_type, [])
  • Helper function to initialize the OAuth1 client and base URL for DevHub API calls, used by get_hours_of_operation.
    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
  • The @mcp.tool() decorator registers the get_hours_of_operation function as an MCP tool.
    @mcp.tool()
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return format (list of 7 items representing days) and behavioral traits like handling of closed days and lunch breaks, but lacks details on error handling, permissions, or rate limits. It adds value beyond basic function but is incomplete for full transparency.

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 sized and front-loaded with the core purpose. It efficiently includes examples and parameter explanations, though the formatting of examples could be slightly clearer. Most sentences add value without 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 no annotations and no output schema, the description does well to explain the return structure and parameters. However, it lacks information on error cases, authentication needs, or rate limits, making it incomplete for a tool with 2 parameters and complex return behavior.

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?

Schema description coverage is 0%, so the description must compensate. It explains 'location_id' as a 'DevHub Location ID' and 'hours_type' with its default and user specification context, adding meaningful semantics beyond the bare schema. However, it doesn't detail possible values for 'hours_type' beyond 'primary'.

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 ('Get the hours of operation') and resource ('for a DevHub location'), distinguishing it from sibling tools like 'get_locations' or 'update_hours'. It precisely defines what the tool does without being vague or tautological.

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 like 'get_locations' or 'update_hours'. It mentions a default for 'hours_type' but lacks explicit context, prerequisites, or exclusions for tool selection.

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