indexing_publish
Notify Google about URL updates or removals using the Indexing API to improve search visibility and manage page indexing.
Instructions
Notify Google about a URL update or removal via the Indexing API. Use URL_UPDATED when a page is created or updated, URL_DELETED when a page is removed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The fully-qualified URL to notify about | |
| type | Yes | Notification type: URL_UPDATED or URL_DELETED |
Implementation Reference
- src/index.ts:546-560 (handler)The handler function that executes the indexing_publish tool, calling the Indexing API's publish endpoint.
async ({ url, type }) => { try { const result = await apiCall( `${INDEXING_BASE}/urlNotifications:publish`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ url, type }), }, ); return toolResult(result); } catch (e) { return errorResult(e); } }, - src/index.ts:536-550 (registration)Tool registration for 'indexing_publish' using server.tool.
// ── indexing_publish ── server.tool( "indexing_publish", "Notify Google about a URL update or removal via the Indexing API. Use URL_UPDATED when a page is created or updated, URL_DELETED when a page is removed.", { url: z.string().describe("The fully-qualified URL to notify about"), type: z .enum(["URL_UPDATED", "URL_DELETED"]) .describe("Notification type: URL_UPDATED or URL_DELETED"), }, async ({ url, type }) => { try { const result = await apiCall( `${INDEXING_BASE}/urlNotifications:publish`, {