From af797eb070ce34fd06fd3bcaac7422b1ecd3e9dd Mon Sep 17 00:00:00 2001 From: enesgules Date: Wed, 30 Sep 2026 11:41:50 +0300 Subject: [PATCH 1/5] Use the new Context7 Ask note wording --- docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.json b/docs.json index 912c04624..0513db6cd 100644 --- a/docs.json +++ b/docs.json @@ -2488,7 +2488,7 @@ "indexing": "all", "metatags": { "canonical": "https://upstash.com/docs", - "context7-ask": "This site publishes a search endpoint at https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068. Append &query= to receive matching excerpts from this site's pages with their URLs. If nothing matches, the response says so." + "context7-ask": "This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so." } }, "footer": { From 1865e5f1e2f91ac2b3983dbfe9b213277b97e62b Mon Sep 17 00:00:00 2001 From: enesgules Date: Wed, 30 Sep 2026 11:50:43 +0300 Subject: [PATCH 2/5] Add the Context7 Ask search endpoint to llms.txt and llms-full.txt --- llms-full.txt | 4 ++++ llms.txt | 4 ++++ llms/src/build.ts | 11 +++++++++++ 3 files changed, 19 insertions(+) diff --git a/llms-full.txt b/llms-full.txt index 7066c872e..6e723d4e8 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -4,6 +4,10 @@ Upstash also provides an MCP server (/docs/agent-resources/mcp) to manage and debug your Upstash resources directly from an agent, and an agent-friendly CLI (/docs/agent-resources/cli) for your terminal or CI/CD pipelines. +## Search + +This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so. + # README Source: https://upstash.com/docs/README diff --git a/llms.txt b/llms.txt index 0b98a79ec..45fb63fa0 100644 --- a/llms.txt +++ b/llms.txt @@ -6,6 +6,10 @@ Upstash also provides an MCP server (/docs/agent-resources/mcp) to manage and debug your Upstash resources directly from an agent, and an agent-friendly CLI (/docs/agent-resources/cli) for your terminal or CI/CD pipelines. +## Search + +This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so. + ## Docs - [README](https://upstash.com/docs/README.md) diff --git a/llms/src/build.ts b/llms/src/build.ts index 833f7337b..8b0d41fa0 100644 --- a/llms/src/build.ts +++ b/llms/src/build.ts @@ -57,6 +57,15 @@ const PREAMBLE = ` Upstash also provides an MCP server (/docs/agent-resources/mcp) to manage and debug your Upstash resources directly from an agent, and an agent-friendly CLI (/docs/agent-resources/cli) for your terminal or CI/CD pipelines. `; +/** + * The Context7 Ask search endpoint for upstash.com, in the same words as the + * `context7-ask` meta tag in docs.json. Agents read llms.txt first and rarely + * read the HTML head, so it is repeated here in both files. + */ +const SEARCH_SECTION = `## Search + +This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so.`; + interface Entry { title: string; /** Site-relative path without leading slash, e.g. `agent-resources/cli`. */ @@ -167,6 +176,7 @@ function addOrphanMdxFiles(): void { function writeLlmsTxt(): void { const lines: string[] = ["# Upstash Documentation", ""]; lines.push(PREAMBLE, ""); + lines.push(SEARCH_SECTION, ""); lines.push("## Docs", ""); for (const e of entries) { const url = `${SITE_URL}/${e.path}.md`; @@ -207,6 +217,7 @@ function writeLlmsFullTxt(): void { // visually separated from neighbours. const chunks: string[] = []; chunks.push(`${PREAMBLE}\n\n`); + chunks.push(`${SEARCH_SECTION}\n\n`); for (const e of entries) { if (isExcludedFromFullTxt(e.path)) { const url = `${SITE_URL}/${e.path}.md`; From 4e52d92c3741cc5bd982c04418a00b9c77f28bc5 Mon Sep 17 00:00:00 2001 From: enesgules Date: Wed, 30 Sep 2026 15:24:07 +0300 Subject: [PATCH 3/5] Plainer Context7 Ask note --- docs.json | 2 +- llms-full.txt | 2 +- llms.txt | 2 +- llms/src/build.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs.json b/docs.json index 0513db6cd..86e3309c0 100644 --- a/docs.json +++ b/docs.json @@ -2488,7 +2488,7 @@ "indexing": "all", "metatags": { "canonical": "https://upstash.com/docs", - "context7-ask": "This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so." + "context7-ask": "This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so." } }, "footer": { diff --git a/llms-full.txt b/llms-full.txt index 6e723d4e8..30c0f5c84 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -6,7 +6,7 @@ ## Search -This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so. +This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. # README Source: https://upstash.com/docs/README diff --git a/llms.txt b/llms.txt index 45fb63fa0..f3c17dbbc 100644 --- a/llms.txt +++ b/llms.txt @@ -8,7 +8,7 @@ ## Search -This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so. +This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. ## Docs diff --git a/llms/src/build.ts b/llms/src/build.ts index 8b0d41fa0..d707942d4 100644 --- a/llms/src/build.ts +++ b/llms/src/build.ts @@ -64,7 +64,7 @@ const PREAMBLE = ` */ const SEARCH_SECTION = `## Search -This site has a search endpoint for its pages: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns the excerpts that match the question, each with its page URL. It needs no API key, and the request holds only the question. If nothing matches, the response says so.`; +This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so.`; interface Entry { title: string; From 38a94675363ea3a54a5c6f9df3615574c0af7260 Mon Sep 17 00:00:00 2001 From: enesgules Date: Wed, 30 Sep 2026 15:40:16 +0300 Subject: [PATCH 4/5] List the Docs7 search endpoint next to Context7 Ask in llms.txt --- llms-full.txt | 3 ++- llms.txt | 3 ++- llms/src/build.ts | 10 ++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/llms-full.txt b/llms-full.txt index 30c0f5c84..874e450d4 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -6,7 +6,8 @@ ## Search -This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. +- This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. +- Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. # README Source: https://upstash.com/docs/README diff --git a/llms.txt b/llms.txt index f3c17dbbc..5f2202eab 100644 --- a/llms.txt +++ b/llms.txt @@ -8,7 +8,8 @@ ## Search -This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. +- This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. +- Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. ## Docs diff --git a/llms/src/build.ts b/llms/src/build.ts index d707942d4..5b615c690 100644 --- a/llms/src/build.ts +++ b/llms/src/build.ts @@ -58,13 +58,15 @@ const PREAMBLE = ` `; /** - * The Context7 Ask search endpoint for upstash.com, in the same words as the - * `context7-ask` meta tag in docs.json. Agents read llms.txt first and rarely - * read the HTML head, so it is repeated here in both files. + * The two search endpoints agents can call, in both files: the Context7 Ask + * endpoint (same words as the `context7-ask` meta tag in docs.json) and the + * Docs7 search that every Docs7 site serves (same words as the llms.txt Docs7 + * generates, which this custom file replaces). */ const SEARCH_SECTION = `## Search -This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so.`; +- This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. +- Search these docs: GET ${SITE_URL}/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown.`; interface Entry { title: string; From 10e0e2fe62ef02f44641ab2a95b20a9952b37c47 Mon Sep 17 00:00:00 2001 From: enesgules Date: Wed, 30 Sep 2026 15:46:51 +0300 Subject: [PATCH 5/5] Remove Context7 Ask from the docs; list only the Docs7 search in llms.txt --- docs.json | 3 +-- llms-full.txt | 3 +-- llms.txt | 3 +-- llms/src/build.ts | 10 ++++------ 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/docs.json b/docs.json index 86e3309c0..a0a4726ef 100644 --- a/docs.json +++ b/docs.json @@ -2487,8 +2487,7 @@ "seo": { "indexing": "all", "metatags": { - "canonical": "https://upstash.com/docs", - "context7-ask": "This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so." + "canonical": "https://upstash.com/docs" } }, "footer": { diff --git a/llms-full.txt b/llms-full.txt index 874e450d4..b49c8796b 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -6,8 +6,7 @@ ## Search -- This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. -- Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. +Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. # README Source: https://upstash.com/docs/README diff --git a/llms.txt b/llms.txt index 5f2202eab..3b854242a 100644 --- a/llms.txt +++ b/llms.txt @@ -8,8 +8,7 @@ ## Search -- This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. -- Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. +Search these docs: GET https://upstash.com/docs/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown. ## Docs diff --git a/llms/src/build.ts b/llms/src/build.ts index 5b615c690..c9c5399b2 100644 --- a/llms/src/build.ts +++ b/llms/src/build.ts @@ -58,15 +58,13 @@ const PREAMBLE = ` `; /** - * The two search endpoints agents can call, in both files: the Context7 Ask - * endpoint (same words as the `context7-ask` meta tag in docs.json) and the - * Docs7 search that every Docs7 site serves (same words as the llms.txt Docs7 - * generates, which this custom file replaces). + * The Docs7 search every Docs7 site serves, in the same words as the llms.txt + * Docs7 generates. This custom file replaces that one, so it lists the search + * itself. */ const SEARCH_SECTION = `## Search -- This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_4cf2adc7846aa874f833b068&query=. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so. -- Search these docs: GET ${SITE_URL}/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown.`; +Search these docs: GET ${SITE_URL}/search?q= returns JSON { results: [{ href, title, heading, snippet, tab }] }. Append .md to any page href for its markdown.`; interface Entry { title: string;