Skip to main content
Glama

update_content_site

Modify content site details including contact information, address, URLs, and other operational data for staging environments.

Instructions

Update staging site information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressLine1NoContent Site Address Line 1
addressLine2NoContent Site Address Line 2
billingEmailNoContent Site Billing Email
cityNoContent Site City
contactEmailNoContent Site Contact Email
contentSiteIdYesContent Site ID
countryNoContent Site Country
nameNoContent Site Name
postalCodeNoContent Site Postal Code
productionUrlNoContent Site Production URL
repoUrlNoContent Site Repository URL
stateNoContent Site State

Implementation Reference

  • The handler function for 'update_content_site' tool. It constructs a payload from optional input parameters and sends a PUT request to the Headlesshost API endpoint `/tools/content-sites/${contentSiteId}` to update the content site details.
    async ({ contentSiteId, name, contactEmail, billingEmail, addressLine1, addressLine2, city, state, country, postalCode, productionUrl, repoUrl }) => { try { const payload: any = {}; if (name) payload.name = name; if (contactEmail) payload.contactEmail = contactEmail; if (billingEmail) payload.billingEmail = billingEmail; if (addressLine1) payload.addressLine1 = addressLine1; if (addressLine2) payload.addressLine2 = addressLine2; if (city) payload.city = city; if (state) payload.state = state; if (country) payload.country = country; if (postalCode) payload.postalCode = postalCode; if (productionUrl) payload.productionUrl = productionUrl; if (repoUrl) payload.repoUrl = repoUrl; const response: AxiosResponse<ApiResponse> = await apiClient.put(`/tools/content-sites/${contentSiteId}`, payload); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: handleApiError(error), }, ], isError: true, }; } } );
  • The input schema and metadata (title, description) for the 'update_content_site' tool, defining optional fields for updating content site properties using Zod validation.
    { title: "Update Staging Site", description: "Update staging site information", inputSchema: { contentSiteId: z.string().describe("Content Site ID"), name: z.string().optional().describe("Content Site Name"), contactEmail: z.string().optional().describe("Content Site Contact Email"), billingEmail: z.string().optional().describe("Content Site Billing Email"), addressLine1: z.string().optional().describe("Content Site Address Line 1"), addressLine2: z.string().optional().describe("Content Site Address Line 2"), city: z.string().optional().describe("Content Site City"), state: z.string().optional().describe("Content Site State"), country: z.string().optional().describe("Content Site Country"), postalCode: z.string().optional().describe("Content Site Postal Code"), productionUrl: z.string().optional().describe("Content Site Production URL"), repoUrl: z.string().optional().describe("Content Site Repository URL"), },
  • src/index.ts:849-906 (registration)
    The registration of the 'update_content_site' tool using server.registerTool, including schema, title, description, and the handler function.
    server.registerTool( "update_content_site", { title: "Update Staging Site", description: "Update staging site information", inputSchema: { contentSiteId: z.string().describe("Content Site ID"), name: z.string().optional().describe("Content Site Name"), contactEmail: z.string().optional().describe("Content Site Contact Email"), billingEmail: z.string().optional().describe("Content Site Billing Email"), addressLine1: z.string().optional().describe("Content Site Address Line 1"), addressLine2: z.string().optional().describe("Content Site Address Line 2"), city: z.string().optional().describe("Content Site City"), state: z.string().optional().describe("Content Site State"), country: z.string().optional().describe("Content Site Country"), postalCode: z.string().optional().describe("Content Site Postal Code"), productionUrl: z.string().optional().describe("Content Site Production URL"), repoUrl: z.string().optional().describe("Content Site Repository URL"), }, }, async ({ contentSiteId, name, contactEmail, billingEmail, addressLine1, addressLine2, city, state, country, postalCode, productionUrl, repoUrl }) => { try { const payload: any = {}; if (name) payload.name = name; if (contactEmail) payload.contactEmail = contactEmail; if (billingEmail) payload.billingEmail = billingEmail; if (addressLine1) payload.addressLine1 = addressLine1; if (addressLine2) payload.addressLine2 = addressLine2; if (city) payload.city = city; if (state) payload.state = state; if (country) payload.country = country; if (postalCode) payload.postalCode = postalCode; if (productionUrl) payload.productionUrl = productionUrl; if (repoUrl) payload.repoUrl = repoUrl; const response: AxiosResponse<ApiResponse> = await apiClient.put(`/tools/content-sites/${contentSiteId}`, payload); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: handleApiError(error), }, ], isError: true, }; } } );
  • TypeScript interface defining the structure of a ContentSite entity, used in API responses for the update_content_site tool.
    interface ContentSite { id: string; name: string; description?: string; accountId: string; isActive: boolean; createdAt: string; updatedAt: string; }

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