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 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** | [![Install in Cursor](https://img.shields.io/badge/Install-Cursor-blue?logo=cursor)](cursor://anysphere.cursor-deeplink/mcp/install?name=gemini-web&config=eyJjb21tYW5kIjogIm5weCIsICJhcmdzIjogWyIteSIsICJnZW1pbmktd2ViLW1jcCJdLCAiZW52IjogeyJHRU1JTklfQVBJX0tFWSI6ICJ5b3VyLWFwaS1rZXkifX0=) |
26
- | **VS Code** | [![Install in VS Code](https://img.shields.io/badge/Install-VS%20Code-007ACC?logo=visualstudiocode)](vscode:mcp/install?config=%7B%22name%22%3A%20%22gemini-web%22%2C%20%22command%22%3A%20%22npx%22%2C%20%22args%22%3A%20%5B%22-y%22%2C%20%22gemini-web-mcp%22%5D%2C%20%22env%22%3A%20%7B%22GEMINI_API_KEY%22%3A%20%22your-api-key%22%7D%7D) |
27
- | **VS Code Insiders** | [![Install in VS Code Insiders](https://img.shields.io/badge/Install-VS%20Code%20Insiders-24bfa5?logo=visualstudiocode)](vscode-insiders:mcp/install?config=%7B%22name%22%3A%20%22gemini-web%22%2C%20%22command%22%3A%20%22npx%22%2C%20%22args%22%3A%20%5B%22-y%22%2C%20%22gemini-web-mcp%22%5D%2C%20%22env%22%3A%20%7B%22GEMINI_API_KEY%22%3A%20%22your-api-key%22%7D%7D) |
25
+ | **Cursor** | [![Install in Cursor](https://img.shields.io/badge/Install-Cursor-blue?logo=cursor)](https://cursor.com/en/install-mcp?name=gemini-web&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImdlbWluaS13ZWItbWNwIl0sImVudiI6eyJHRU1JTklfQVBJX0tFWSI6InlvdXItYXBpLWtleSJ9fQ==) |
26
+ | **VS Code** | [![Install in VS Code](https://img.shields.io/badge/Install-VS%20Code-007ACC?logo=visualstudiocode)](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** | [![Install in VS Code Insiders](https://img.shields.io/badge/Install-VS%20Code%20Insiders-24bfa5?logo=visualstudiocode)](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 - use view_content_chunk " +
43
- "to read specific chunks by position. The DocumentId for view_content_chunk is the URL.",
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 {
@@ -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
- parts.push(`\nDocument contains ${doc.chunks.length} chunks:`);
430
- for (const chunk of doc.chunks) {
431
- const overlapNote = chunk.hasOverlap ? " (includes overlap)" : "";
432
- parts.push(`- [${chunk.position}] ${chunk.summary} (${chunk.charCount} chars${overlapNote})`);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemini-web-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server with Gemini-powered web tools: search, content extraction, deep research, and image generation",
5
5
  "author": "bharatvansh",
6
6
  "license": "MIT",