From f60afe1b25518becefb2077cb4debf33bb1451ef Mon Sep 17 00:00:00 2001 From: "Nolann B." <100787331+nolannbiron@users.noreply.github.com> Date: Mon, 29 Jun 2026 10:15:57 +0200 Subject: [PATCH] Add missing MCP annotations (#4347) --- .../[siteURL]/[siteData]/~gitbook/mcp/handler.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/gitbook/src/app/sites/dynamic/[mode]/[siteURL]/[siteData]/~gitbook/mcp/handler.ts b/packages/gitbook/src/app/sites/dynamic/[mode]/[siteURL]/[siteData]/~gitbook/mcp/handler.ts index abeee5895..13c35b467 100644 --- a/packages/gitbook/src/app/sites/dynamic/[mode]/[siteURL]/[siteData]/~gitbook/mcp/handler.ts +++ b/packages/gitbook/src/app/sites/dynamic/[mode]/[siteURL]/[siteData]/~gitbook/mcp/handler.ts @@ -65,6 +65,13 @@ export async function handleMcpRequest( { query: z.string(), }, + { + title: 'Search documentation', + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: true, + }, async ({ query }) => { const results = await throwIfDataError( dataFetcher.searchSiteContent({ @@ -163,6 +170,13 @@ export async function handleMcpRequest( return z.NEVER; }), }, + { + title: 'Get page content', + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: true, + }, async ({ url }) => { try { const match = findSiteSpaceByUrl(context.structure, url);