sitemaps_submit
Submit sitemaps to Google Search Console for website indexing. This tool sends XML sitemap URLs to Google to help crawlers discover and index your site content.
Instructions
Submit a sitemap for a site to Google Search Console.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteUrl | Yes | The site URL | |
| feedpath | Yes | The URL of the sitemap to submit (e.g. 'https://example.com/sitemap.xml') |
Implementation Reference
- src/index.ts:306-323 (handler)The handler function for sitemaps_submit that calls the Google Search Console API.
async ({ siteUrl, feedpath }) => { try { const result = await apiCall( `${WEBMASTERS_BASE}/sites/${encodeSiteUrl(siteUrl)}/sitemaps/${encodeURIComponent(feedpath)}`, { method: "PUT" }, ); return { content: [ { type: "text" as const, text: result.ok ? `Sitemap "${feedpath}" submitted successfully.` : result.body, }, ], isError: !result.ok, }; } catch (e) { - src/index.ts:298-305 (schema)The input schema validation for the sitemaps_submit tool using Zod.
{ siteUrl: z.string().describe("The site URL"), feedpath: z .string() .describe( "The URL of the sitemap to submit (e.g. 'https://example.com/sitemap.xml')", ), }, - src/index.ts:295-306 (registration)The registration of the sitemaps_submit tool.
server.tool( "sitemaps_submit", "Submit a sitemap for a site to Google Search Console.", { siteUrl: z.string().describe("The site URL"), feedpath: z .string() .describe( "The URL of the sitemap to submit (e.g. 'https://example.com/sitemap.xml')", ), }, async ({ siteUrl, feedpath }) => {