parts-store/mcp.html

38 lines
2.5 KiB
HTML

<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>MCP & API — PromptPCB Parts</title>
<link rel="stylesheet" href="/assets/style.css">
<header class="top"><div class="wrap">
<a class="brand" href="/"><span class="dot"></span> PromptPCB <small>· Parts</small></a>
<nav class="main"><a href="/">Catalog</a><a href="/submit.html">Submit a part</a><a href="/mcp.html" class="active">MCP / API</a></nav>
<span class="spacer"></span><span class="credits">◆ <b>5</b> credits</span>
</div></header>
<div class="wrap"><div class="form" style="max-width:900px">
<h1 class="dh1">Ground your design agent in real parts</h1>
<p style="color:var(--dim);line-height:1.6">Every part here is exposed to AI design tools over <b>MCP</b> and a plain HTTP <b>API</b>, so a model can ask
<em>"what do I have to blink an LED"</em> or <em>"a connector rated 20&nbsp;A"</em> and get real, verified, in-stock options — with
labelled pins, SPICE, and a 3D model — <b>before</b> it starts building a module.</p>
<div class="section"><h3>MCP tools</h3><div class="uc">
<li><b>library_overview</b> — the whole catalog at a glance</li>
<li><b>search_parts</b> — semantic reverse lookup ("something to drive a brushless motor")</li>
<li><b>suggest_for_need</b> — a functional need → ranked options with the reason to pick each</li>
<li><b>find_parts_by_requirements</b> — filters where a rating must <em>cover</em> the ask, e.g. <code>{class:"connector", min_current_a:20}</code></li>
<li><b>resolve_value</b> — "50 ohm resistor" → the series + closest standard value</li>
<li><b>list_parts_in_class</b> · <b>get_part</b> — browse a class / full record (specs, pins, SPICE, datasheet, 3D)</li>
</div></div>
<div class="section"><h3>HTTP API</h3>
<pre class="spice">GET /overview | /classes | /class/:class | /part/:id
POST /search { "query": "reverse polarity protection" }
POST /requirements { "class": "connector", "min_current_a": 20 }
POST /suggest { "need": "step 5V down to 3.3V" }
POST /resolve_value{ "query": "100nF" }</pre>
</div>
<div class="section"><h3>Your saved library</h3>
<p style="color:var(--dim);line-height:1.6">Add specific parts to <b>your library</b> and they're cached to your account — search over just your parts, reuse
them forever, and pull their files without spending credits again. Contribute a novel curated part to top up your download credits.</p>
</div>
<a class="btn" href="/">Browse the catalog →</a>
</div></div>