Skip to main content
Glama

Generate JSON from a web page with AI

pulpminer_generate_json

Turn a web page into structured JSON with an LLM. Provide a sample JSON shape to control output, or let the AI infer it; does not save data.

Instructions

Scrape a web page and convert it to structured JSON with an LLM (PulpMiner POST /external/ai/json). Pass jsonFormat to force an exact output shape; omit it to let the AI infer a flat JSON. Does not save anything. Costs 0.25 credits (+0.1 with renderJs). Can take 10-60s+. Needs only the PulpMiner API key (PULPMINER_API_KEY locally, or Authorization: Bearer <key> on the hosted server).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
llmNoLLM used to convert HTML to JSON. llm_2 = OpenAI GPT (default), llm_1 = Google Gemini, llm_3 = Groq (only if enabled for the account; otherwise the API returns 'bad request').llm_2
urlYesFull URL of the web page to extract data from (http/https).
scraperNoScraper backend. scraper_1 (default, supports useSession) or scraper_2. Try the other one if a site blocks scraping.scraper_1
renderJsNoRender JavaScript in a headless browser before extracting (default true; adds 0.1 credits).
selectorNoCSS selector to limit extraction to part of the page, e.g. "main" or "#results". Default: whole body.
jsonFormatNoSample JSON whose keys define the output shape, e.g. {"title": "", "price": "", "items": [{"name": ""}]}. Key names are kept exactly; values are extracted from the page.
useSessionNoUse a persistent scraping session (scraper_1 only; ignored for lifetime-plan accounts).
extraLLMInfoNoExtra natural-language instructions for the LLM, e.g. 'only the first 10 products, prices as numbers'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only cover the safety profile (readOnlyHint false, destructiveHint false, idempotentHint false), but the description adds material behavior the annotations cannot convey: exact credit cost (0.25, +0.1 with renderJs), 10-60s+ latency, that nothing is persisted, and the authentication requirements for both local and hosted execution.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense paragraph with the core action front-loaded, followed by cost, latency and auth facts as terse clauses. Every sentence earns its place; nothing is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should carry return-value burden; it explains the shape logic (jsonFormat-driven vs. inferred flat JSON) but not the envelope of the response or error behavior. Cost, timing, auth and persistence are all covered, so it is nearly complete for an 8-parameter nested-schema tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description nonetheless adds meaning beyond the schema by explaining the jsonFormat semantics (force an exact output shape vs. infer a flat JSON) and the renderJs cost relationship and jsonFormat omission default.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Scrape a web page and convert it to structured JSON with an LLM') and even names the underlying endpoint. 'Does not save anything' implicitly separates it from pulpminer_save_as_api, so an agent can pick it apart from siblings without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating context: pass jsonFormat to force an exact shape, omit it to let the AI infer a flat JSON; renderJs adds cost; only the PulpMiner API key is needed. It stops short of explicitly naming alternative tools or a when-not-to-use condition, so a full 5 isn't warranted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.