gemini-web-mcp 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.js +3 -2
- package/dist/tools/urlContent.js +10 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,9 +22,9 @@ An MCP server that brings **Gemini-powered web tools** to your AI coding assista
|
|
|
22
22
|
|
|
23
23
|
| IDE | Install |
|
|
24
24
|
|-----|---------|
|
|
25
|
-
| **Cursor** | [](cursor
|
|
26
|
-
| **VS Code** | [](vscode
|
|
27
|
-
| **VS Code Insiders** | [](vscode
|
|
25
|
+
| **Cursor** | [](https://cursor.com/en/install-mcp?name=gemini-web&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImdlbWluaS13ZWItbWNwIl0sImVudiI6eyJHRU1JTklfQVBJX0tFWSI6InlvdXItYXBpLWtleSJ9fQ==) |
|
|
26
|
+
| **VS Code** | [](https://insiders.vscode.dev/redirect/mcp/install?name=gemini-web&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22gemini-web-mcp%22%5D%2C%22env%22%3A%7B%22GEMINI_API_KEY%22%3A%22your-api-key%22%7D%7D) |
|
|
27
|
+
| **VS Code Insiders** | [](https://insiders.vscode.dev/redirect/mcp/install?name=gemini-web&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22gemini-web-mcp%22%5D%2C%22env%22%3A%7B%22GEMINI_API_KEY%22%3A%22your-api-key%22%7D%7D&quality=insiders) |
|
|
28
28
|
|
|
29
29
|
> **Note:** After clicking, replace `your-api-key` with your [Gemini API key](https://aistudio.google.com/apikey). VS Code requires version 1.101+.
|
|
30
30
|
|
package/dist/index.js
CHANGED
|
@@ -39,8 +39,9 @@ registerToolCompat(server, "read_url_content", {
|
|
|
39
39
|
title: "Read URL Content",
|
|
40
40
|
description: "Fetch content from a URL via HTTP request. Converts HTML to markdown. " +
|
|
41
41
|
"No JavaScript execution, no authentication. For pages requiring login or JavaScript, " +
|
|
42
|
-
"consider alternatives. Returns chunk summaries with positions
|
|
43
|
-
"to read specific chunks by position.
|
|
42
|
+
"consider alternatives. Returns content directly if small, or chunk summaries with positions " +
|
|
43
|
+
"for large pages - use view_content_chunk to read specific chunks by position. " +
|
|
44
|
+
"The DocumentId for view_content_chunk is the URL.",
|
|
44
45
|
inputSchema: readUrlContentInput
|
|
45
46
|
}, async (input) => {
|
|
46
47
|
try {
|
package/dist/tools/urlContent.js
CHANGED
|
@@ -426,12 +426,17 @@ function formatReadUrlResponse(doc) {
|
|
|
426
426
|
if (!doc.isReaderable) {
|
|
427
427
|
parts.push(`\n⚠️ Note: This page may not be a standard article. Content extraction quality may vary.`);
|
|
428
428
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
429
|
+
if (doc.chunks.length === 1) {
|
|
430
|
+
parts.push(`\n**Content:**\n\n${doc.chunks[0].content}`);
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
parts.push(`\nDocument contains ${doc.chunks.length} chunks:`);
|
|
434
|
+
for (const chunk of doc.chunks) {
|
|
435
|
+
const overlapNote = chunk.hasOverlap ? " (includes overlap)" : "";
|
|
436
|
+
parts.push(`- [${chunk.position}] ${chunk.summary} (${chunk.charCount} chars${overlapNote})`);
|
|
437
|
+
}
|
|
438
|
+
parts.push(`\nUse view_content_chunk with document_id="${doc.url}" and position=N to read a chunk.`);
|
|
433
439
|
}
|
|
434
|
-
parts.push(`\nUse view_content_chunk with document_id="${doc.url}" and position=N to read a chunk.`);
|
|
435
440
|
return parts.join("\n");
|
|
436
441
|
}
|
|
437
442
|
// ─────────────────────────────────────────────────────────────
|
package/package.json
CHANGED