diff --git a/README.md b/README.md index cd175a0..dca87a7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Context.dev for Gemini CLI -The official [Context.dev](https://context.dev) extension for [Gemini CLI](https://github.com/google-gemini/gemini-cli). Give Gemini live web and document context through search, company news, scraping, crawling, structured extraction, document parsing, brand intelligence, screenshots, website monitoring, and large batch jobs. +The official [Context.dev](https://context.dev) extension for [Gemini CLI](https://github.com/google-gemini/gemini-cli). Give Gemini live web and document context through search, company news, scraping, crawling, structured extraction, document parsing, brand and people intelligence, account usage, request logs, website monitoring, and large batch jobs. ## Install @@ -8,7 +8,7 @@ The official [Context.dev](https://context.dev) extension for [Gemini CLI](https gemini extensions install https://github.com/context-dot-dev/gemini-cli-context --auto-update --consent ``` -Start a new Gemini CLI session after installation. The first Context.dev request opens a browser for OAuth authentication; no API key needs to be copied into Gemini CLI. +Start a new Gemini CLI session after installation. The first Context.dev request opens a browser for OAuth authentication; no API key needs to be copied into Gemini CLI. After updating the extension, run `/mcp reload` so Gemini refreshes the tool catalog without requiring a new login. If authentication does not start automatically, run this inside Gemini CLI: @@ -47,7 +47,7 @@ Use Context.dev to retrieve the brand profile for linear.app, including its logo - The production Context.dev MCP server at `https://mcp.context.dev/mcp` - OAuth 2.1 authentication with dynamic client registration and PKCE - An on-demand Gemini CLI skill that routes tasks to the smallest suitable Context.dev tool -- Live web search, company news, webpage and YouTube scraping, crawling, extraction, parsing, brand, screenshot, monitor, and batch workflows +- Live web search, company news, webpage and YouTube scraping, crawling, extraction, parsing, brand, people, usage, request-log, monitor, and batch workflows Some Context.dev operations consume account credits. Gemini CLI keeps its normal confirmation controls for tool calls, and the extension does not mark the remote server as trusted. @@ -63,7 +63,7 @@ npm run test:live gemini extensions link . --consent ``` -Restart Gemini CLI after linking the extension. Use `/mcp auth context` to authenticate, then run one of the example prompts above. +Restart Gemini CLI after linking the extension. Use `/mcp reload` after an extension or server update. Use `/mcp auth context` only when authentication is required, then run one of the example prompts above. ## Uninstall diff --git a/gemini-extension.json b/gemini-extension.json index f883e80..a6cecbc 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,7 +1,7 @@ { "name": "gemini-cli-context", - "version": "1.0.0", - "description": "Give Gemini CLI live web and document context through Context.dev search, news, scraping, crawling, extraction, parsing, brand intelligence, screenshots, monitors, and batches.", + "version": "1.1.0", + "description": "Give Gemini CLI live web and document context through Context.dev search, news, scraping, crawling, extraction, parsing, brand and people intelligence, usage, request logs, monitors, and batches.", "mcpServers": { "context": { "url": "https://mcp.context.dev/mcp", diff --git a/package-lock.json b/package-lock.json index 693c868..4b03f76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gemini-cli-context", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gemini-cli-context", - "version": "1.0.0", + "version": "1.1.0", "devDependencies": { "@google/gemini-cli": "0.58.0" }, diff --git a/package.json b/package.json index f980c81..9b95fb8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gemini-cli-context", - "version": "1.0.0", + "version": "1.1.0", "private": true, "description": "Official Context.dev extension for Gemini CLI", "type": "module", diff --git a/skills/context-dev/SKILL.md b/skills/context-dev/SKILL.md index 5455e1e..2122f21 100644 --- a/skills/context-dev/SKILL.md +++ b/skills/context-dev/SKILL.md @@ -1,6 +1,6 @@ --- name: context-dev -description: Use Context.dev when a task needs current public-web, company-news, website, or document data. Search the live web; read, scrape, crawl, or screenshot sites; extract structured data; parse documents; retrieve brand intelligence; monitor changes; or process large batches. Trigger even when Context.dev is not named. Do not trigger when supplied content already contains the answer, the task is about private account data, or no web or file retrieval is needed. +description: Use Context.dev when a task needs current public-web, company-news, website, or document data, or when the user wants to inspect their Context.dev credit usage or API request logs. Search or research the live web; read, scrape, crawl, or screenshot sites; extract structured data; parse documents; retrieve brand or people intelligence; monitor changes; or process large batches. Trigger even when Context.dev is not named. Do not trigger when supplied content already contains the answer or no web, file, or Context.dev account data is needed. --- # Context.dev @@ -10,18 +10,17 @@ Use the connected Context.dev tools to retrieve current public web and document ## Choose the right tool - Use `get-news-search` for current, verified news about one company. -- Use `web-search` for broader live-web research or when the source URL is unknown. -- Use `web-scrape-markdown` to read or analyze one known page, including timestamped YouTube transcripts. -- Use `web-scrape-html` only when raw markup, DOM structure, attributes, or scripts are required. -- Use `web-scrape-images` for page image assets and `web-screenshot` for a rendered page capture. -- Use `web-scrape-sitemap` to discover or search a site's URLs without downloading every page body. +- Use `web-search` for ranked live-web results. Enable `highlightsOptions` for relevant source passages or `markdownOptions` for complete page content. Use `web-answers` for a sourced answer in a requested JSON shape. +- Use `web-scrape` for one known page. Request only the needed outputs with `formats`, such as `{ markdown: true }`, `{ screenshot: true }`, or `{ json: true }` with `jsonParams.schema`. +- Use `web-map` to discover or filter a site's URLs without downloading every page body. - Use `web-crawl` for a focused set of linked pages when the result is needed synchronously. -- Use `web-extract` when the user wants schema-shaped fields such as products, pricing, jobs, or locations. - Use `parse-document` for PDFs, presentations, spreadsheets, documents, images, code, data, and text files. - Use `get-brand` for a visual brand profile. Use `brand-retrieve-unified` for raw structured brand data or alternative company identifiers. -- Use `web-styleguide` and `web-fonts` for a site's visual system and typography. -- Use `web-naics` or `web-sic` for industry classification. -- Use monitor tools for recurring change detection and batch tools for large asynchronous jobs. +- Use `brand-search` to find a company, `web-styleguide` for its visual system and typography, and `people-enrich` for a person profile. +- Use `get-usage` for the current credit balance, monthly usage, and next refill. Use `get-usage-history` for credits and requests over time, optionally grouped by endpoint, API key, or status code. +- Use `list-logs` to find recent Context.dev API requests and `get-log` for one request's redacted input, response, timing, credits, and error details. +- Use monitor tools for recurring change detection, webhook tools for delivery troubleshooting, and batch tools for large asynchronous jobs. +- Use `submit-feedback` to report a Context.dev bug, documentation mismatch, or agent friction when requested. ## Work effectively @@ -30,8 +29,8 @@ Use the connected Context.dev tools to retrieve current public web and document 3. For structured extraction, request only the fields the user needs and never invent missing values. 4. For large jobs, call `submit-batch`, then check `get-batch` and `get-batch-results`. Submission does not mean completion. 5. Before creating or changing a monitor, confirm the intended target, schedule, and change criteria. -6. Treat browser actions, monitor mutations, and batch mutations as side-effectful. Perform them only when clearly requested. -7. If authentication fails, ask the user to reconnect Context.dev with `/mcp auth context`. Never fabricate results or silently substitute stale data. +6. Treat browser actions, monitor or batch mutations, webhook retries or secret rotation, and feedback submission as side-effectful. Perform them only when clearly requested. +7. If tools look stale or unavailable, ask the user to run `/mcp reload`. If authentication fails, ask them to reconnect Context.dev with `/mcp auth context`. Never fabricate results or silently substitute stale data. ## Common requests @@ -40,6 +39,8 @@ Use the connected Context.dev tools to retrieve current public web and document - Extract every pricing plan into structured JSON. - Parse a research paper, spreadsheet, or presentation. - Retrieve a company's logo, colors, socials, and industry. +- Diagnose a failed Context.dev request from recent API logs. +- Check the account's remaining credits and recent usage history. - Find all documentation pages about a feature. - Monitor a page for meaningful pricing changes. - Process hundreds or thousands of URLs asynchronously. diff --git a/tests/extension.test.mjs b/tests/extension.test.mjs index 3b38c65..0938332 100644 --- a/tests/extension.test.mjs +++ b/tests/extension.test.mjs @@ -38,20 +38,38 @@ test("does not embed credentials or bypass Gemini confirmations", () => { assert.equal("httpUrl" in manifest.mcpServers.context, false); }); -test("ships focused routing for every released Context capability", () => { +test("ships focused routing for the current Context tool catalog", () => { assert.match(skill, /^---\nname: context-dev\ndescription: .+\n---\n/); for (const capability of [ "get-news-search", "web-search", - "web-scrape-markdown", + "web-scrape", + "web-map", "web-crawl", - "web-extract", + "web-answers", "parse-document", "get-brand", - "web-screenshot", + "people-enrich", + "get-usage", + "get-usage-history", + "list-logs", + "get-log", "submit-batch", + "submit-feedback", ]) { assert.match(skill, new RegExp(`\\b${capability}\\b`)); } - assert.doesNotMatch(skill, /`(?:web-)?answers?`|\/v1\/web\/answers/i); + for (const removedTool of [ + "web-scrape-markdown", + "web-scrape-html", + "web-scrape-images", + "web-screenshot", + "web-scrape-sitemap", + "web-extract", + "web-fonts", + "web-naics", + "web-sic", + ]) { + assert.doesNotMatch(skill, new RegExp(`\\b${removedTool}\\b`)); + } });