sites_add
Add a website property to Google Search Console for tracking search performance and indexing status.
Instructions
Add a site (property) to Google Search Console. Verification may still be required.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteUrl | Yes | The site URL to add (e.g. 'https://example.com/' or 'sc-domain:example.com') |
Implementation Reference
- src/index.ts:176-202 (handler)The implementation of the `sites_add` tool handler, which uses `apiCall` to perform a PUT request to the Webmasters API.
// ── sites_add ── server.tool( "sites_add", "Add a site (property) to Google Search Console. Verification may still be required.", { siteUrl: z .string() .describe( "The site URL to add (e.g. 'https://example.com/' or 'sc-domain:example.com')", ), }, async ({ siteUrl }) => { try { const result = await apiCall( `${WEBMASTERS_BASE}/sites/${encodeSiteUrl(siteUrl)}`, { method: "PUT" }, ); return { content: [ { type: "text" as const, text: result.ok ? `Site "${siteUrl}" added successfully.` : result.body, }, ], isError: !result.ok,