Skip to main content
Glama

update_hours

Modify business hours for a DevHub location by specifying time ranges for each day, including multiple intervals for breaks and marking days as closed.

Instructions

Update the hours of operation for a DevHub location

Send 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 new_hours: Structured format of the new hours hours_type: Defaults to 'primary' unless the user specifies a different type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
location_idYes
new_hoursYes
hours_typeNoprimary

Implementation Reference

  • The update_hours tool handler: decorated with @mcp.tool() for MCP registration, includes input schema in docstring and parameters, executes API PUT request to update location hours in DevHub CMS.
    @mcp.tool() def update_hours(location_id: int, new_hours: list, hours_type: str = 'primary') -> str: """Update the hours of operation for a DevHub location Send 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 new_hours: Structured format of the new hours hours_type: Defaults to 'primary' unless the user specifies a different type """ client, base_url = get_client() r = client.put( '{}locations/{}/'.format(base_url, location_id), json={ 'hours': [ { 'type': hours_type, 'hours': new_hours, } ] }, ) content = json.loads(r.content) return 'Updated successfully'

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