agent-ready-mcp 0.3.0 → 0.4.0

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.
Files changed (2) hide show
  1. package/dist/mcp-server.mjs +85 -20
  2. package/package.json +1 -1
@@ -9229,13 +9229,13 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
9229
9229
  canary.aborted = true;
9230
9230
  return canary;
9231
9231
  }
9232
- const checkResult = runChecks(payload, checks, ctx);
9233
- if (checkResult instanceof Promise) {
9232
+ const checkResult2 = runChecks(payload, checks, ctx);
9233
+ if (checkResult2 instanceof Promise) {
9234
9234
  if (ctx.async === false)
9235
9235
  throw new $ZodAsyncError();
9236
- return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
9236
+ return checkResult2.then((checkResult3) => inst._zod.parse(checkResult3, ctx));
9237
9237
  }
9238
- return inst._zod.parse(checkResult, ctx);
9238
+ return inst._zod.parse(checkResult2, ctx);
9239
9239
  };
9240
9240
  inst._zod.run = (payload, ctx) => {
9241
9241
  if (ctx.skipChecks) {
@@ -31529,22 +31529,22 @@ async function scanSite(config2, input) {
31529
31529
  throw err;
31530
31530
  }
31531
31531
  if (last && last.status && last.status !== "running") {
31532
- return { content: [{ type: "text", text: JSON.stringify(last) }] };
31532
+ return {
31533
+ content: [{ type: "text", text: JSON.stringify(last) }],
31534
+ structuredContent: last
31535
+ };
31533
31536
  }
31534
31537
  }
31538
+ const running = {
31539
+ id: placeholder.id,
31540
+ status: "running",
31541
+ url: input.url,
31542
+ pollUrl: placeholder.pollUrl ?? `/api/v1/scans/${placeholder.id}`,
31543
+ message: "Scan still running after the local poll deadline. Call get_scan with this id to fetch the final result."
31544
+ };
31535
31545
  return {
31536
- content: [
31537
- {
31538
- type: "text",
31539
- text: JSON.stringify({
31540
- id: placeholder.id,
31541
- status: "running",
31542
- url: input.url,
31543
- pollUrl: placeholder.pollUrl ?? `/api/v1/scans/${placeholder.id}`,
31544
- message: "Scan still running after the local poll deadline. Call get_scan with this id to fetch the final result."
31545
- })
31546
- }
31547
- ]
31546
+ content: [{ type: "text", text: JSON.stringify(running) }],
31547
+ structuredContent: running
31548
31548
  };
31549
31549
  }
31550
31550
 
@@ -31552,7 +31552,10 @@ async function scanSite(config2, input) {
31552
31552
  async function getScanById(config2, input) {
31553
31553
  try {
31554
31554
  const scan = await getScanFromApi(config2, input.id);
31555
- return { content: [{ type: "text", text: JSON.stringify(scan) }] };
31555
+ return {
31556
+ content: [{ type: "text", text: JSON.stringify(scan) }],
31557
+ structuredContent: scan
31558
+ };
31556
31559
  } catch (err) {
31557
31560
  if (err instanceof ApiError) {
31558
31561
  if (err.status === 404) {
@@ -31568,7 +31571,10 @@ async function getScanById(config2, input) {
31568
31571
  async function askQuery(config2, input) {
31569
31572
  try {
31570
31573
  const envelope = await postAsk(config2, input);
31571
- return { content: [{ type: "text", text: JSON.stringify(envelope) }] };
31574
+ return {
31575
+ content: [{ type: "text", text: JSON.stringify(envelope) }],
31576
+ structuredContent: envelope && typeof envelope === "object" ? envelope : {}
31577
+ };
31572
31578
  } catch (err) {
31573
31579
  if (err instanceof ApiError) {
31574
31580
  throw new ToolError(err.code, err.message);
@@ -31577,6 +31583,62 @@ async function askQuery(config2, input) {
31577
31583
  }
31578
31584
  }
31579
31585
 
31586
+ // src/output.ts
31587
+ var checkResult = external_exports.object({
31588
+ checkId: external_exports.string(),
31589
+ name: external_exports.string(),
31590
+ status: external_exports.enum(["pass", "fail", "warn", "error"]),
31591
+ message: external_exports.string(),
31592
+ howToFix: external_exports.string().nullable(),
31593
+ details: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
31594
+ });
31595
+ var pageResult = external_exports.object({
31596
+ url: external_exports.string(),
31597
+ checks: external_exports.array(checkResult)
31598
+ });
31599
+ var scanOutputShape = {
31600
+ id: external_exports.string(),
31601
+ status: external_exports.enum(["running", "completed", "failed"]),
31602
+ rootUrl: external_exports.string().optional(),
31603
+ createdAt: external_exports.string().optional(),
31604
+ completedAt: external_exports.string().nullable().optional(),
31605
+ pagesDiscovered: external_exports.number().optional(),
31606
+ pagesScanned: external_exports.number().optional(),
31607
+ vercelScore: external_exports.number().optional(),
31608
+ vercelRating: external_exports.string().optional(),
31609
+ llmstxtScore: external_exports.number().optional(),
31610
+ siteChecks: external_exports.array(checkResult).optional(),
31611
+ llmstxtChecks: external_exports.array(checkResult).optional(),
31612
+ pageResults: external_exports.array(pageResult).optional(),
31613
+ shareToken: external_exports.string().optional(),
31614
+ // Present only on the running placeholder, not on a full Scan.
31615
+ url: external_exports.string().optional(),
31616
+ pollUrl: external_exports.string().optional(),
31617
+ message: external_exports.string().optional()
31618
+ };
31619
+ var askResult = external_exports.object({
31620
+ url: external_exports.string().optional(),
31621
+ name: external_exports.string().optional(),
31622
+ site: external_exports.string().optional(),
31623
+ score: external_exports.number().optional(),
31624
+ description: external_exports.string().optional(),
31625
+ schema_object: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
31626
+ });
31627
+ var askOutputShape = {
31628
+ _meta: external_exports.object({
31629
+ response_type: external_exports.string(),
31630
+ version: external_exports.string().optional(),
31631
+ mode: external_exports.string().optional()
31632
+ }).optional(),
31633
+ query_id: external_exports.string().optional(),
31634
+ site: external_exports.string().optional(),
31635
+ mode: external_exports.string().optional(),
31636
+ query: external_exports.string().optional(),
31637
+ results: external_exports.array(askResult).optional(),
31638
+ summary: external_exports.string().optional(),
31639
+ error: external_exports.object({ code: external_exports.string(), message: external_exports.string() }).optional()
31640
+ };
31641
+
31580
31642
  // src/types.ts
31581
31643
  var scanSiteInputShape = {
31582
31644
  url: external_exports.string().url().max(2e3).describe("Fully-qualified URL to scan, including scheme (https://...)."),
@@ -31600,7 +31662,7 @@ var askInputShape = {
31600
31662
  // src/server.ts
31601
31663
  var SERVER_INFO = {
31602
31664
  name: "agent-ready",
31603
- version: "0.3.0"
31665
+ version: "0.4.0"
31604
31666
  };
31605
31667
  function createMcpServer(config2) {
31606
31668
  const server = new McpServer(SERVER_INFO);
@@ -31616,6 +31678,7 @@ function createMcpServer(config2) {
31616
31678
  title: "Scan a site for AI agent readability",
31617
31679
  description: "Runs the agent-ready.dev scanner against a URL and returns structured results: Vercel score, llmstxt.org score, and per-check findings with remediation hints. Scans may take up to ~60s; if the local poll deadline elapses, the tool returns the scan id and asks you to poll with get_scan.",
31618
31680
  inputSchema: scanSiteInputShape,
31681
+ outputSchema: scanOutputShape,
31619
31682
  annotations: READ_ONLY_OPEN_WORLD
31620
31683
  },
31621
31684
  async (args) => {
@@ -31632,6 +31695,7 @@ function createMcpServer(config2) {
31632
31695
  title: "Get a previous scan by id",
31633
31696
  description: "Fetches a completed or in-progress scan by its id. Only scans owned by the authenticated API key's user are returned.",
31634
31697
  inputSchema: getScanInputShape,
31698
+ outputSchema: scanOutputShape,
31635
31699
  annotations: READ_ONLY_OPEN_WORLD
31636
31700
  },
31637
31701
  async (args) => {
@@ -31648,6 +31712,7 @@ function createMcpServer(config2) {
31648
31712
  title: "Ask Agent Ready in natural language",
31649
31713
  description: "Natural-language search (NLWeb /ask) over Agent Ready's own content \u2014 scoring methodology, the check registry, and the specs it validates. Public, no API key required. Returns Schema.org-typed result objects; optional itemType narrows to a corpus type and mode 'summarize' adds an extractive summary.",
31650
31714
  inputSchema: askInputShape,
31715
+ outputSchema: askOutputShape,
31651
31716
  annotations: READ_ONLY_OPEN_WORLD
31652
31717
  },
31653
31718
  async (args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-ready-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "mcpName": "io.github.mlava/agent-ready-mcp",
5
5
  "description": "MCP server for Agent Ready — scan any URL for AI-readability against the Vercel Agent Readability Spec, the llmstxt.org standard, and agent-protocol manifests (MCP server cards, A2A, agents.json, agent-permissions.json, UCP, x402, NLWeb). 60 checks with per-check fix guidance.",
6
6
  "license": "MIT",