Skip to main content
Glama

update_staging_site

Updates staging site details including name, locale, URLs, and content properties for website testing and development environments.

Instructions

Update staging site information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoStaging site content
contentSiteIdYesContent Site ID
guideUrlNoStaging site guide URL
isHeadYesIs the default staging site
localeNoStaging site default locale
nameNoStaging site name
stageUrlNoStaging site stage URL
stagingSiteIdYesStaging Site ID

Implementation Reference

  • Handler function that constructs a payload from input parameters and sends a PUT request to the Headlesshost API to update the specified staging site.
    async ({ contentSiteId, stagingSiteId, name, locale, isHead, content, stageUrl, guideUrl }) => { try { const payload: any = {}; if (name) payload.name = name; if (locale) payload.locale = locale; if (isHead) payload.isHead = isHead; if (content) payload.content = content; if (stageUrl) payload.stageUrl = stageUrl; if (guideUrl) payload.guideUrl = guideUrl; const response: AxiosResponse<ApiResponse> = await apiClient.put(`/tools/content-sites/${contentSiteId}/staging-sites/${stagingSiteId}`, payload); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: handleApiError(error), }, ], isError: true, }; }
  • Zod input schema defining required contentSiteId and stagingSiteId, and optional fields for updating staging site properties.
    inputSchema: { contentSiteId: z.string().describe("Content Site ID"), stagingSiteId: z.string().describe("Staging Site ID"), name: z.string().optional().describe("Staging site name"), locale: z.string().optional().describe("Staging site default locale"), isHead: z.boolean().describe("Is the default staging site"), content: z.record(z.any()).optional().describe("Staging site content"), stageUrl: z.string().optional().describe("Staging site stage URL"), guideUrl: z.string().optional().describe("Staging site guide URL"), },
  • src/index.ts:951-999 (registration)
    MCP tool registration call that registers the 'update_staging_site' tool with its schema and handler on the McpServer instance.
    server.registerTool( "update_staging_site", { title: "Update Staging Site", description: "Update staging site information", inputSchema: { contentSiteId: z.string().describe("Content Site ID"), stagingSiteId: z.string().describe("Staging Site ID"), name: z.string().optional().describe("Staging site name"), locale: z.string().optional().describe("Staging site default locale"), isHead: z.boolean().describe("Is the default staging site"), content: z.record(z.any()).optional().describe("Staging site content"), stageUrl: z.string().optional().describe("Staging site stage URL"), guideUrl: z.string().optional().describe("Staging site guide URL"), }, }, async ({ contentSiteId, stagingSiteId, name, locale, isHead, content, stageUrl, guideUrl }) => { try { const payload: any = {}; if (name) payload.name = name; if (locale) payload.locale = locale; if (isHead) payload.isHead = isHead; if (content) payload.content = content; if (stageUrl) payload.stageUrl = stageUrl; if (guideUrl) payload.guideUrl = guideUrl; const response: AxiosResponse<ApiResponse> = await apiClient.put(`/tools/content-sites/${contentSiteId}/staging-sites/${stagingSiteId}`, payload); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: handleApiError(error), }, ], isError: true, }; } } );

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

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