mcp-scraper 0.43.6 → 0.44.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.
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-T5AFM4G5.js";
22
22
  import {
23
23
  PACKAGE_VERSION
24
- } from "./chunk-4FQDZ2T7.js";
24
+ } from "./chunk-RUDXFPKE.js";
25
25
  import {
26
26
  MC_PER_CREDIT
27
27
  } from "./chunk-X5WDJ7D7.js";
@@ -344,6 +344,46 @@ seam is noted so you can chain them.
344
344
  hosts, domains, or selected URLs across a date range without downloading page copy. Use it before
345
345
  \`extract_site.wayback\` when you need capture counts or available months first.
346
346
 
347
+ ## Transparent Commons public wiki
348
+ - Search the public entity graph -> **commons_search_entities**. It matches title, body, tags, keywords,
349
+ JSON-LD, media, citations, source metadata, related entities, trails, and saved account filters.
350
+ - Read one published entity -> **commons_get_entity**. It returns the Wikidata-style backend fields,
351
+ JSON-LD, source provenance, media, ledger, and the Wikipedia-style page projection.
352
+ - List unresolved See Also concepts -> **commons_list_needs_links**. Use it to find concepts that appear
353
+ in public See Also sections but do not yet have a Commons entity ID or /wiki/ slug.
354
+ - Plan a new or edited entity -> **commons_prepare_entity**. This is the Commons equivalent of
355
+ prepare-memory-write: it returns the live entity profile contract, duplicate candidates, tag reuse/review/create
356
+ guidance, recommended sections, optional sections, and heading guidance before any write occurs.
357
+ - Validate a composed entity without writing -> **commons_validate_entity**. Use it after composing and before submit
358
+ to catch missing featured images, missing source/body evidence, duplicate conflicts, revision problems, and
359
+ unsupported placeholder sections.
360
+ - Create or edit a public wiki entity -> **commons_submit_entity**. This is a governed proposal write,
361
+ not direct rendered HTML editing. Normal workflow is prepare -> validate -> submit. Pick the closest entity type
362
+ first: SoftwareApplication, Organization, Person, Event, Place, Taxon, ScienceConcept, MathConcept, TechArticle,
363
+ Trail, or PublicArticle.
364
+ The body must be a neutral encyclopedia projection, not a blog post or raw scrape dump. Use H2 for the
365
+ entity's main sections and H3/H4/H5 for subtopics; every heading becomes a public page-menu item.
366
+ Entity profiles are adaptive contracts, not empty templates. Use the prepare output as the guide, but omit
367
+ unsupported headings and subsections. If there is no source-backed history, do not add History. If there is no
368
+ independent reception evidence, do not add Reception. Never write a section whose only content is that evidence
369
+ was not found.
370
+ - See Also is for interlinking concepts, not dumping source links. When the concept already exists in
371
+ Commons, include its entityId or slug. When it does not exist, include title, relationship, summary, and
372
+ needsLink: true so the backend can expose it through commons_list_needs_links and future graph-building runs.
373
+ - Commons articles follow neutral-point-of-view, verifiability, and no-original-research behavior:
374
+ self-published or captured source pages can support uncontroversial source-owned facts, but independent
375
+ notability, reception, criticism, market position, medical/scientific claims, and biography claims require
376
+ reliable independent sources. Preserve original URL, source byline, canonical URL, featured image, media,
377
+ citations, related entities, and contribution ledger context.
378
+ - Published Commons article body, tags, keywords, JSON-LD metadata, related entities, and See Also concepts
379
+ are indexed as the platform-owned Commons graph with storageScope platform_commons_graph and
380
+ countsAgainstUserStorage false. Comments, reader alerts, private reading-room state, and personal Memory vault
381
+ content are excluded from this Commons index.
382
+ - Save account-specific MCP scopes -> **commons_save_filter** and list them with **commons_list_filters**.
383
+ Use saved filters when a person wants their MCP to operate inside a reading room, trail, source scope,
384
+ category, tag bundle, media constraint, or other personalized subset of the shared Commons graph.
385
+
386
+
347
387
  ## Google Maps
348
388
  - Find multiple places/competitors/prospects -> **maps_search** (returns \`results[]\` with name,
349
389
  placeUrl, cid; set \`includeServices: true\` to enrich each result where available).
@@ -423,6 +463,19 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
423
463
  \`sourceLabel\`; do not hand it raw source material and expect it to invent the editorial architecture.
424
464
  - ${savesReportsLocally ? "This local stdio server writes one self-contained HTML file and returns its localPath so the user can open it." : "This hosted server creates a private seven-day HTML artifact and returns a signed download URL; use renew_editorial_reading_room_download after the URL expires."}
425
465
 
466
+ ## Local Sourcebook listings
467
+ - Treat a listing capture like a governed Memory write. First call **list-local-sourcebook-tags** and
468
+ **get-local-sourcebook-contract**, then **prepare-local-sourcebook-write**, inspect every tag resolution,
469
+ and call **validate-local-sourcebook-write**. Call **local-sourcebook-capture** only when validation returns
470
+ \`valid:true\`.
471
+ - A new capture creates an owner-scoped private draft and queues paid broad website, exact Maps place,
472
+ maximum-accessible review, service-area, staff, and genuine-media acquisition. It does not publish.
473
+ - Read progress and the compiled draft with **local_sourcebook_submission_status**. Revise an existing draft
474
+ through **validate-local-sourcebook-write** and **local-sourcebook-capture** with its current \`baseRevision\`.
475
+ Use **local_sourcebook_refresh** only when the owner intentionally wants to pay for a new acquisition pass.
476
+ - The last approved revision remains public during refresh. Only an administrator can publish, reject, or
477
+ unpublish a listing.
478
+
426
479
  ## Notes
427
480
  - For current prices, balances, or limits, call \`credits_info\`. The public machine-readable rate contract is
428
481
  \`https://mcpscraper.dev/rates\`; customer-facing details are at \`https://mcpscraper.dev/pricing\`. Do not rely
@@ -4534,7 +4587,7 @@ var ExtractUrlBaseInputSchema = {
4534
4587
  screenshotDevice: z3.enum(["desktop", "mobile"]).default("desktop").describe("Viewport for screenshot. desktop = 1440\xD7900, mobile = 390\xD7844."),
4535
4588
  extractBranding: z3.boolean().default(false).describe("Extract brand colors, fonts, logo, and favicon via a rendered browser session."),
4536
4589
  includeFeaturedImage: z3.boolean().default(false).describe("Return the best featured image from Open Graph, Twitter, JSON-LD, or page content. For Wayback replay URLs, also returns the timestamp-matched archived image URL when available."),
4537
- downloadMedia: z3.boolean().default(false).describe("Extract page media (images/video/audio) into the result or an owned artifact. Ad/tracking noise is filtered automatically."),
4590
+ downloadMedia: z3.boolean().optional().describe("Deprecated alias for preserveMedia. Omit when using preserveMedia; when omitted, media preservation defaults to false."),
4538
4591
  mediaTypes: z3.array(z3.enum(["image", "video", "audio"])).default(["image", "video", "audio"]).describe("Which media types to download. Default all three."),
4539
4592
  delivery: z3.enum(["auto", "inline", "artifact", "memory"]).default("auto").describe("Where to deliver the result. auto keeps small results inline and offloads large ones; artifact always returns an owned artifact; memory stores the full page in hosted Memory; inline returns a bounded response."),
4540
4593
  preserveMedia: z3.boolean().default(false).describe("Preserve discovered media in the result workflow. This is the preferred replacement for downloadMedia."),
@@ -4576,7 +4629,7 @@ var ExtractSiteInputSchema = {
4576
4629
  background: z3.literal(true).default(true).describe("MCP multi-page crawls always run as durable background jobs. Poll check_site_export for progress, outcome counters, and the hosted ZIP."),
4577
4630
  delivery: z3.enum(["auto", "artifact"]).default("auto").describe("Multi-page crawls are durable exports. auto and artifact both return a job handle followed by an owner-scoped ZIP; artifact explicitly requests that durable destination."),
4578
4631
  preserveMedia: z3.boolean().default(false).describe("Include supported images in the export bundle. This is the preferred replacement for downloadImages."),
4579
- downloadImages: z3.boolean().default(false).describe("Download every discovered image as a real file into the export bundle (not just image URLs/stats). OFF by default \u2014 must be explicitly set true. Implies background regardless of the background flag, since downloading a whole site's images is too slow to run synchronously. Capped at 20 images/page and 500 images/site.")
4632
+ downloadImages: z3.boolean().optional().describe("Deprecated alias for preserveMedia. Omit when using preserveMedia; when omitted, image preservation defaults to false.")
4580
4633
  };
4581
4634
  var AuditSiteInputSchema = {
4582
4635
  url: WebsiteUrlOrDomainSchema.describe("Public website URL or domain for a full technical SEO audit (issues, link graph, indexability, headings, images). Bare domains default to https://. For plain content use extract_site instead."),
@@ -4587,7 +4640,7 @@ var AuditSiteInputSchema = {
4587
4640
  background: z3.literal(true).default(true).describe("MCP technical audits always run as durable background jobs. Poll check_site_export for progress, outcome counters, and the hosted audit ZIP."),
4588
4641
  delivery: z3.enum(["auto", "artifact"]).default("auto").describe("Technical audits are durable exports. auto and artifact both return a job handle followed by an owner-scoped ZIP; artifact explicitly requests that durable destination."),
4589
4642
  preserveMedia: z3.boolean().default(false).describe("Include supported images in the export bundle. This is the preferred replacement for downloadImages."),
4590
- downloadImages: z3.boolean().default(false).describe("Download every discovered image as a real file into the export bundle (not just image URLs/stats). OFF by default \u2014 must be explicitly set true. Implies background regardless of the background flag, since downloading a whole site's images is too slow to run synchronously. Capped at 20 images/page and 500 images/site.")
4643
+ downloadImages: z3.boolean().optional().describe("Deprecated alias for preserveMedia. Omit when using preserveMedia; when omitted, image preservation defaults to false.")
4591
4644
  };
4592
4645
  var CheckSiteExportInputSchema = {
4593
4646
  jobId: z3.string().min(1).describe("The jobId returned by extract_site or audit_site. Poll until status is complete, partial, or failed; partial jobs still return a downloadable bundle with successful pages and failure details.")
@@ -4762,9 +4815,267 @@ var LocationMarketsInputSchema = {
4762
4815
  maxResults: z3.number().int().min(1).max(100).default(25).describe("Maximum markets to return, sorted by population descending."),
4763
4816
  includeZipGroups: z3.boolean().default(true).describe("Include ZIP and county groups from the active hosted ZIP dataset.")
4764
4817
  };
4818
+ var CommonsSearchEntitiesInputSchema = {
4819
+ query: z3.string().trim().max(300).optional().describe("Search text matched against title, description, tags, keywords, JSON-LD, source metadata, citations, media, and article body."),
4820
+ entityType: z3.string().trim().max(120).optional().describe('Optional entity type filter. "Public Article", "PublicArticle", "Article", and "item" normalize to PublicArticle.'),
4821
+ tag: z3.string().trim().max(80).optional().describe("Single canonical tag filter. Use tags for multiple tags."),
4822
+ tags: z3.array(z3.string().trim().min(1).max(80)).max(20).optional().describe("Multiple tag filters. All supplied tags are applied."),
4823
+ keyword: z3.string().trim().max(120).optional().describe("Single keyword filter. Use keywords for multiple keywords."),
4824
+ keywords: z3.array(z3.string().trim().min(1).max(120)).max(20).optional().describe("Multiple keyword filters. All supplied keywords are applied."),
4825
+ relatedEntityId: z3.string().trim().max(80).optional().describe("Return entities related to this Transparent Public Wiki entity id."),
4826
+ trailId: z3.string().trim().max(80).optional().describe("Return entities collected into a specific reading trail entity."),
4827
+ sourceDomain: z3.string().trim().max(240).optional().describe("Filter by original-source or canonical-source domain text."),
4828
+ hasMedia: z3.boolean().optional().describe("When true, only return entities with image, video, or audio media records."),
4829
+ hasVideo: z3.boolean().optional().describe("When true, only return entities with at least one video media record."),
4830
+ publishedAfter: z3.string().trim().max(80).optional().describe("Optional ISO-ish lower bound for publishedAt."),
4831
+ updatedAfter: z3.string().trim().max(80).optional().describe("Optional ISO-ish lower bound for updatedAt."),
4832
+ filterId: z3.string().trim().max(200).optional().describe("Optional saved filter id from commons_list_filters. The saved filter is merged with this call for this account."),
4833
+ limit: z3.number().int().min(1).max(100).default(20).describe("Maximum entities to return. Default 20, maximum 100."),
4834
+ offset: z3.number().int().min(0).max(1e4).default(0).describe("Pagination offset.")
4835
+ };
4836
+ var CommonsGetEntityInputSchema = {
4837
+ idOrSlug: z3.string().trim().min(1).max(180).describe("Transparent Public Wiki entity id such as TPW-Q... or a public /wiki/ slug."),
4838
+ includeWikiPage: z3.boolean().default(true).describe("Include the Wikipedia-style page projection used by transparent-commons.cc/wiki/.")
4839
+ };
4840
+ var CommonsFeaturedImageInputSchema = z3.object({
4841
+ url: z3.string().url().describe("Required public image URL for a publishable entity. Use extract_url includeFeaturedImage or preserved media when available."),
4842
+ alt: z3.string().trim().max(500).optional(),
4843
+ caption: z3.string().trim().max(1e3).optional(),
4844
+ sourceUrl: z3.string().url().optional(),
4845
+ license: z3.string().trim().max(240).optional(),
4846
+ width: z3.number().int().positive().optional(),
4847
+ height: z3.number().int().positive().optional()
4848
+ }).strict();
4849
+ var CommonsMediaInputSchema = z3.object({
4850
+ type: z3.enum(["image", "video", "audio"]),
4851
+ url: z3.string().url(),
4852
+ alt: z3.string().trim().max(500).optional(),
4853
+ caption: z3.string().trim().max(1e3).optional(),
4854
+ posterUrl: z3.string().url().optional(),
4855
+ sourceUrl: z3.string().url().optional(),
4856
+ license: z3.string().trim().max(240).optional(),
4857
+ width: z3.number().int().positive().optional(),
4858
+ height: z3.number().int().positive().optional(),
4859
+ durationSeconds: z3.number().int().positive().optional()
4860
+ }).strict();
4861
+ var CommonsCitationInputSchema = z3.object({
4862
+ title: z3.string().trim().min(1).max(240),
4863
+ url: z3.string().url().optional(),
4864
+ source: z3.string().trim().max(240).optional(),
4865
+ note: z3.string().trim().max(1e3).optional(),
4866
+ accessedAt: z3.string().trim().max(80).optional()
4867
+ }).strict();
4868
+ var CommonsSourceInputSchema = z3.object({
4869
+ originalUrl: z3.string().url().optional().describe("Original source URL when content was captured or republished."),
4870
+ resolvedUrl: z3.string().url().optional().describe("Final URL after redirects."),
4871
+ sourceCanonicalUrl: z3.string().url().optional().describe("Originator canonical URL discovered from metadata or declared by the contributor."),
4872
+ relCanonicalHref: z3.string().url().optional().describe("rel=canonical target to use when the public page is a substantial republish."),
4873
+ sourceByline: z3.string().trim().max(240).optional().describe("Source byline/original author label."),
4874
+ publisher: z3.string().trim().max(240).optional(),
4875
+ authors: z3.array(z3.string().trim().min(1).max(120)).max(20).optional(),
4876
+ publishedAt: z3.string().trim().max(80).optional(),
4877
+ capturedAt: z3.string().trim().max(80).optional(),
4878
+ license: z3.string().trim().max(240).optional(),
4879
+ rightsSummary: z3.string().trim().max(1e3).optional(),
4880
+ contentHash: z3.string().trim().max(200).optional()
4881
+ }).strict();
4882
+ var CommonsRelatedLinkInputSchema = z3.object({
4883
+ title: z3.string().trim().min(1).max(180).describe("See Also concept title. Use concept labels such as Model Context Protocol, Web scraping, or Hybrid RAG."),
4884
+ url: z3.string().trim().max(2e3).optional().describe("Optional existing internal or external URL. Omit when the concept needs a new Commons page."),
4885
+ slug: z3.string().trim().max(180).optional().describe("Existing Transparent Commons /wiki/ slug when available. Prefer this over a raw public URL for internal pages."),
4886
+ entityId: z3.string().trim().max(80).optional().describe("Existing Transparent Public Wiki entity id when available. Prefer this for resolved internal concepts."),
4887
+ relationship: z3.string().trim().max(120).optional().describe("Short relationship label, such as protocol, retrieval pattern, source type, or related practice."),
4888
+ summary: z3.string().trim().max(300).optional().describe("Short neutral snippet used by the public See Also row, hover cards, and Commons graph retrieval."),
4889
+ imageUrl: z3.string().trim().max(2e3).optional().describe("Optional preview image for hover cards when available."),
4890
+ needsLink: z3.boolean().default(false).describe("Set true when the concept belongs in See Also but no existing Commons entity/page exists yet. The backend exposes these records through commons_list_needs_links.")
4891
+ }).strict();
4892
+ var CommonsPrepareEntityInputSchema = {
4893
+ title: z3.string().trim().min(1).max(180).describe("Candidate public page title. Used to derive slug, choose a profile, and search duplicate entities."),
4894
+ description: z3.string().trim().max(600).optional().describe("Optional candidate summary. Include when known so the prepare pass can route and validate the article shape."),
4895
+ slug: z3.string().trim().max(180).optional().describe("Optional desired URL slug. Omit to derive one from title."),
4896
+ entityType: z3.string().trim().max(120).default("PublicArticle").describe("Candidate backend Wikidata-style type. Use precise classes when possible: SoftwareApplication, Organization, Person, Event, Place, Taxon, ScienceConcept, MathConcept, TechArticle, Trail, or PublicArticle."),
4897
+ schemaOrgType: z3.string().trim().max(80).optional().describe("Optional candidate schema.org @type. If omitted, the profile chooses one from entityType."),
4898
+ source: CommonsSourceInputSchema.optional().describe("Candidate source provenance used for duplicate checks and rel=canonical guidance."),
4899
+ tags: z3.array(z3.string().trim().min(1).max(80)).max(24).optional().describe("Candidate topic tags to resolve against existing Commons tag vocabulary."),
4900
+ keywords: z3.array(z3.string().trim().min(1).max(120)).max(50).optional().describe("Candidate SEO/retrieval keywords to resolve against existing Commons vocabulary."),
4901
+ bodyMarkdown: z3.string().max(5e5).optional().describe("Optional draft article body. Prepare will inspect headings and return profile alignment guidance without writing anything."),
4902
+ contentSections: z3.array(z3.object({
4903
+ id: z3.string().trim().max(180).optional(),
4904
+ heading: z3.string().trim().min(1).max(180),
4905
+ body: z3.string().trim().min(1).max(1e5),
4906
+ position: z3.number().int().positive().optional(),
4907
+ citations: z3.array(CommonsCitationInputSchema).max(300).optional()
4908
+ }).strict()).max(80).optional().describe("Optional structured draft sections. Use when composing a page from source evidence before submit."),
4909
+ maxCandidates: z3.number().int().min(1).max(20).default(8).describe("Maximum duplicate candidates to return.")
4910
+ };
4911
+ var CommonsSubmitEntityInputSchema = {
4912
+ idempotencyKey: z3.string().trim().min(8).max(200).describe("Required unique opaque ID for this intended Commons write. Reuse only when retrying the same write after a timeout; use a new value for each intentional create or edit."),
4913
+ title: z3.string().trim().min(3).max(180).describe("Public page title. This is also used for duplicate slug/entity checks when slug is omitted."),
4914
+ description: z3.string().trim().min(8).max(600).describe("Short article summary and schema.org description."),
4915
+ slug: z3.string().trim().max(180).optional().describe("Optional URL slug. Omit to derive one from title."),
4916
+ entityId: z3.string().trim().max(80).optional().describe("Existing Transparent Public Wiki entity id when proposing an edit. New entities normally omit this and receive a TPW-Q id."),
4917
+ entityType: z3.string().trim().max(120).default("PublicArticle").describe("Backend Wikidata-style type. Prefer precise entity classes such as SoftwareApplication, Organization, Person, Event, Place, Taxon, ScienceConcept, MathConcept, TechArticle, or PublicArticle; the public article structure should match the selected type."),
4918
+ disambiguationName: z3.string().trim().max(240).optional().describe("Clarifying name used when the concept could be confused with another entity."),
4919
+ featuredImage: CommonsFeaturedImageInputSchema.optional().describe("Required for auto-published public entities. The image is also added to the media manifest if absent."),
4920
+ source: CommonsSourceInputSchema.optional().describe("Source provenance. Store original URL, source byline, and origin canonical here; canonical does not replace rights review."),
4921
+ tags: z3.array(z3.string().trim().min(1).max(80)).max(24).optional().describe("Standardized topic tags. Use existing/searchable concepts when possible."),
4922
+ keywords: z3.array(z3.string().trim().min(1).max(120)).max(50).optional().describe("SEO and retrieval keywords."),
4923
+ relatedEntities: z3.array(z3.object({
4924
+ entityId: z3.string().trim().max(80).optional(),
4925
+ title: z3.string().trim().min(1).max(180),
4926
+ relationship: z3.string().trim().max(120).optional(),
4927
+ slug: z3.string().trim().max(180).optional(),
4928
+ url: z3.string().url().optional(),
4929
+ description: z3.string().trim().max(300).optional()
4930
+ }).strict()).max(200).optional().describe("Related concepts, including trails. Existing entities should use entityId."),
4931
+ bodyMarkdown: z3.string().max(5e5).optional().describe("Structured encyclopedia body in neutral Markdown, not a raw scrape dump or blog essay. Use H2 for entity-profile sections and H3/H4/H5 for subtopics; every heading appears in the public page menu. Call commons_prepare_entity first for the live entity profile and commons_validate_entity before submit. Profile sections are adaptive: include History, Pricing, Reception, Timeline, Classification, or similar sections only when source evidence supports them; omit unsupported sections instead of adding empty/filler headings. Apply NPOV, verifiability, and no-original-research rules; self-published sources can support only uncontroversial source-owned facts."),
4932
+ contentSections: z3.array(z3.object({
4933
+ id: z3.string().trim().max(180).optional(),
4934
+ heading: z3.string().trim().min(1).max(180),
4935
+ body: z3.string().trim().min(1).max(1e5),
4936
+ position: z3.number().int().positive().optional(),
4937
+ citations: z3.array(CommonsCitationInputSchema).max(300).optional()
4938
+ }).strict()).max(80).optional().describe("Structured article sections. If bodyMarkdown is omitted, these are rendered into the article body. Headings should follow the selected entity profile, and body text may include H3/H4/H5 subheadings for every visible page-menu subitem."),
4939
+ articleSections: z3.object({
4940
+ relatedLinks: z3.array(CommonsRelatedLinkInputSchema).max(100).optional().describe("See Also concept links. Resolve to entityId/slug when an entity exists; otherwise keep the concept with needsLink true so it enters the Commons needs-link backlog."),
4941
+ notes: z3.array(z3.object({
4942
+ marker: z3.string().trim().max(20).optional(),
4943
+ body: z3.string().trim().min(1).max(2e3)
4944
+ }).strict()).max(100).optional(),
4945
+ citations: z3.array(CommonsCitationInputSchema).max(300).optional(),
4946
+ externalLinks: z3.array(z3.object({
4947
+ title: z3.string().trim().min(1).max(180),
4948
+ url: z3.string().url(),
4949
+ summary: z3.string().trim().max(300).optional()
4950
+ }).strict()).max(100).optional(),
4951
+ categories: z3.array(z3.string().trim().min(1).max(120)).max(50).optional()
4952
+ }).strict().optional().describe("Wikipedia-style bottom article sections: See also, Notes, Citations, External links, Categories."),
4953
+ media: z3.array(CommonsMediaInputSchema).max(300).optional().describe("Image, video, and audio assets for the public entity. Videos are kept in the media manifest but are not vectorized as comments/community content."),
4954
+ jsonLd: z3.record(z3.string(), z3.unknown()).optional().describe("Optional caller-supplied JSON-LD. Omit to let the server generate schema.org Article JSON-LD from the entity fields."),
4955
+ seo: z3.object({
4956
+ canonicalUrl: z3.string().url().optional(),
4957
+ relCanonical: z3.string().url().optional(),
4958
+ metaTitle: z3.string().trim().max(240).optional(),
4959
+ metaDescription: z3.string().trim().max(500).optional(),
4960
+ ogImage: z3.string().url().optional(),
4961
+ schemaOrgType: z3.string().trim().max(80).optional(),
4962
+ noIndex: z3.boolean().optional()
4963
+ }).strict().optional().describe("schema.org/SEO controls. Use relCanonical for substantial source republishing."),
4964
+ actorChannel: z3.enum(["mcp", "frontend", "api"]).default("mcp").describe("How this contribution was made."),
4965
+ actorLabel: z3.string().trim().max(120).optional().describe("Human, agent, team, or organization label recorded in the public contribution ledger."),
4966
+ changeSummary: z3.string().trim().max(500).optional().describe("Short contribution note recorded in the ledger."),
4967
+ baseRevision: z3.number().int().positive().optional().describe("Required when editing an existing entity if you want auto-publish. Without a matching revision, the proposal is held for review."),
4968
+ reviewPolicy: z3.enum(["auto_publish_if_safe", "always_review"]).default("auto_publish_if_safe").describe("Default auto-publishes only safe non-conflicting writes. Use always_review when the contributor wants human review.")
4969
+ };
4970
+ var CommonsValidateEntityInputSchema = {
4971
+ ...CommonsSubmitEntityInputSchema,
4972
+ idempotencyKey: z3.string().trim().min(8).max(200).optional().describe("Optional write idempotency key. Validation does not write, so this is checked only when supplied."),
4973
+ title: z3.string().trim().max(180).optional().describe("Candidate public page title. Validation reports an error when it is absent or shorter than the publishable minimum."),
4974
+ description: z3.string().trim().max(600).optional().describe("Candidate schema.org description. Validation reports an error when it is absent or shorter than the publishable minimum.")
4975
+ };
4976
+ var CommonsGetEntityLedgerInputSchema = {
4977
+ idOrSlug: z3.string().trim().min(1).max(180).describe("Published entity id or /wiki/ slug whose contribution ledger should be read.")
4978
+ };
4979
+ var CommonsSaveFilterInputSchema = {
4980
+ name: z3.string().trim().min(2).max(80).describe("User-facing name for this MCP personalization filter. Reusing a name updates the saved filter."),
4981
+ description: z3.string().trim().max(500).optional().describe("Optional note explaining when this filter should be used."),
4982
+ filter: z3.object(CommonsSearchEntitiesInputSchema).strict().describe("Search/filter scope to save for this account, such as a category, trail, source domain, tags, or media constraints.")
4983
+ };
4984
+ var CommonsListFiltersInputSchema = {
4985
+ includeExamples: z3.boolean().default(false).describe("When true, include short instructions for using a saved filter id in commons_search_entities.")
4986
+ };
4987
+ var CommonsListNeedsLinksInputSchema = {
4988
+ query: z3.string().trim().max(300).optional().describe("Optional text filter over unresolved concept title, summary, relationship, source page title, source description, and source tags."),
4989
+ entityType: z3.string().trim().max(120).optional().describe("Only return unresolved concepts found on source entities of this type."),
4990
+ tag: z3.string().trim().max(80).optional().describe("Only return unresolved concepts found on source entities with this tag."),
4991
+ tags: z3.array(z3.string().trim().min(1).max(80)).max(20).optional().describe("Only return unresolved concepts found on source entities matching all supplied tags."),
4992
+ sourceEntityId: z3.string().trim().max(80).optional().describe("Only return unresolved concepts from one source entity id."),
4993
+ sourceSlug: z3.string().trim().max(180).optional().describe("Only return unresolved concepts from one /wiki/ source slug."),
4994
+ limit: z3.number().int().min(1).max(100).default(25),
4995
+ offset: z3.number().int().min(0).max(1e4).default(0)
4996
+ };
4997
+ var CommonsGenericOutputSchema = {
4998
+ ok: z3.boolean(),
4999
+ data: z3.unknown().optional(),
5000
+ error: z3.string().optional(),
5001
+ message: z3.string().optional()
5002
+ };
4765
5003
  var DirectoryWorkflowStatusInputSchema = {
4766
5004
  jobId: z3.string().trim().min(1).describe("The jobId returned by directory_workflow. Poll until status is complete, partial, empty, or failed.")
4767
5005
  };
5006
+ var LocalSourcebookSubmitInputSchema = {
5007
+ category: z3.enum(["home", "professional", "restaurants", "financial", "realestate", "auto", "wellness"]).describe("Category subdomain for the listing."),
5008
+ state: z3.string().trim().length(2).describe("Two-letter US state abbreviation used in the canonical URL."),
5009
+ businessName: z3.string().trim().min(2).max(160).describe("Public business name."),
5010
+ websiteUrl: z3.url().describe("Business homepage. Local Sourcebook will queue a broad crawl for details, services or products, service areas, genuine images, and review-source discovery."),
5011
+ slug: z3.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(100).optional().describe("Optional canonical URL slug; generated from the business name when omitted."),
5012
+ idempotencyKey: z3.string().trim().min(8).max(200).optional().describe("Opaque retry key that prevents duplicate submissions.")
5013
+ };
5014
+ var LocalSourcebookCategorySchema = z3.enum(["home", "professional", "restaurants", "financial", "realestate", "auto", "wellness"]);
5015
+ var LocalSourcebookTagCandidateObjectSchema = z3.object({
5016
+ tag: z3.string().trim().min(1).max(60),
5017
+ central: z3.boolean().optional(),
5018
+ reusable: z3.boolean().optional(),
5019
+ description: z3.string().trim().min(8).max(240).optional()
5020
+ });
5021
+ var LocalSourcebookTagDecisionObjectSchema = z3.object({
5022
+ tag: z3.string().trim().min(1).max(60),
5023
+ central: z3.boolean(),
5024
+ reusable: z3.boolean(),
5025
+ description: z3.string().trim().min(8).max(240).optional(),
5026
+ acceptCanonical: z3.string().trim().min(1).max(60).optional()
5027
+ });
5028
+ var LocalSourcebookIdentityObjectSchema = z3.object({
5029
+ category: LocalSourcebookCategorySchema,
5030
+ state: z3.string().trim().length(2),
5031
+ businessName: z3.string().trim().min(2).max(160),
5032
+ websiteUrl: z3.url(),
5033
+ slug: z3.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(100).optional(),
5034
+ tags: z3.array(z3.string().trim().min(1).max(60)).max(20).default([]),
5035
+ idempotencyKey: z3.string().trim().min(8).max(200)
5036
+ });
5037
+ var GetLocalSourcebookContractInputSchema = {
5038
+ category: LocalSourcebookCategorySchema.optional().describe("Optional category whose required canonical tag and contract details should be selected.")
5039
+ };
5040
+ var ListLocalSourcebookTagsInputSchema = {
5041
+ includeDeprecated: z3.boolean().default(true).describe("Include deprecated and pending tags so the caller sees the complete directory vocabulary.")
5042
+ };
5043
+ var ResolveLocalSourcebookTagsInputSchema = {
5044
+ candidates: z3.array(LocalSourcebookTagCandidateObjectSchema).min(1).max(20).describe("Proposed reusable directory concepts to resolve against the live vocabulary.")
5045
+ };
5046
+ var PrepareLocalSourcebookWriteInputSchema = {
5047
+ category: LocalSourcebookCategorySchema,
5048
+ state: z3.string().trim().length(2),
5049
+ businessName: z3.string().trim().min(2).max(160),
5050
+ websiteUrl: z3.url(),
5051
+ slug: z3.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(100).optional(),
5052
+ tags: z3.array(z3.string().trim().min(1).max(60)).max(20).default([]),
5053
+ idempotencyKey: z3.string().trim().min(8).max(200),
5054
+ tagCandidates: z3.array(LocalSourcebookTagCandidateObjectSchema).max(20).optional()
5055
+ };
5056
+ var ValidateLocalSourcebookWriteInputSchema = {
5057
+ identity: LocalSourcebookIdentityObjectSchema.optional().describe("New-listing identity returned by prepare-local-sourcebook-write."),
5058
+ listing: z3.record(z3.string(), z3.unknown()).optional().describe("Complete replacement listing draft for an existing owner-scoped submission."),
5059
+ submissionId: z3.string().trim().min(1).optional().describe("Existing owner-scoped submission being revised. Omit for a new capture."),
5060
+ baseRevision: z3.number().int().min(1).optional().describe("Required current draft revision for an edit, preventing silent overwrites."),
5061
+ tagCandidates: z3.array(LocalSourcebookTagCandidateObjectSchema).max(20).optional(),
5062
+ tagDecisions: z3.array(LocalSourcebookTagDecisionObjectSchema).max(20).optional()
5063
+ };
5064
+ var LocalSourcebookCaptureInputSchema = {
5065
+ ...ValidateLocalSourcebookWriteInputSchema,
5066
+ idempotencyKey: z3.string().trim().min(8).max(200).optional().describe("Stable retry key for a new capture. Required for new listings; omit only when revising an existing submissionId.")
5067
+ };
5068
+ var LocalSourcebookSubmissionStatusInputSchema = {
5069
+ submissionId: z3.string().trim().min(1).describe("The owner-scoped submission ID returned by local-sourcebook-capture.")
5070
+ };
5071
+ var LocalSourcebookUpdateDraftInputSchema = {
5072
+ submissionId: z3.string().trim().min(1),
5073
+ payload: z3.record(z3.string(), z3.unknown()).describe("Complete replacement draft. The previous revision remains immutable in the audit history.")
5074
+ };
5075
+ var LocalSourcebookRefreshInputSchema = {
5076
+ submissionId: z3.string().trim().min(1).describe("Owner-scoped listing submission to re-crawl and refresh.")
5077
+ };
5078
+ var LocalSourcebookOutputSchema = z3.record(z3.string(), z3.unknown());
4768
5079
  var ArtifactPointerOutputSchema = z3.object({
4769
5080
  artifactId: z3.string(),
4770
5081
  bytes: z3.number().int().min(0),
@@ -7502,6 +7813,123 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
7502
7813
  outputSchema: recordOutputSchema("g2_reviews", G2ReviewsOutputSchema),
7503
7814
  annotations: liveWebToolAnnotations("G2 Review Harvest")
7504
7815
  }, async (input) => formatG2Reviews(await executor.g2Reviews(input), input));
7816
+ server.registerTool("commons_search_entities", {
7817
+ title: "Transparent Commons Entity Search",
7818
+ description: "Search the Transparent Commons public wiki graph using the same fields the public /wiki/ frontend uses: title, description, tags, keywords, JSON-LD, article body, citations, media, source metadata, related entities, trails, and saved account filters. This reads published Commons entities only.",
7819
+ inputSchema: CommonsSearchEntitiesInputSchema,
7820
+ outputSchema: recordOutputSchema("commons_search_entities", CommonsGenericOutputSchema),
7821
+ annotations: {
7822
+ title: "Transparent Commons Entity Search",
7823
+ readOnlyHint: true,
7824
+ destructiveHint: false,
7825
+ idempotentHint: true,
7826
+ openWorldHint: false
7827
+ }
7828
+ }, async (input) => executor.commonsSearchEntities(input));
7829
+ server.registerTool("commons_get_entity", {
7830
+ title: "Transparent Commons Entity Lookup",
7831
+ description: "Fetch one published Transparent Commons entity by TPW-Q id or /wiki/ slug, including JSON-LD/Wikidata-style backend fields and, by default, the Wikipedia-style page projection rendered by transparent-commons.cc/wiki/.",
7832
+ inputSchema: CommonsGetEntityInputSchema,
7833
+ outputSchema: recordOutputSchema("commons_get_entity", CommonsGenericOutputSchema),
7834
+ annotations: {
7835
+ title: "Transparent Commons Entity Lookup",
7836
+ readOnlyHint: true,
7837
+ destructiveHint: false,
7838
+ idempotentHint: true,
7839
+ openWorldHint: false
7840
+ }
7841
+ }, async (input) => executor.commonsGetEntity(input));
7842
+ server.registerTool("commons_list_needs_links", {
7843
+ title: "Transparent Commons Needs-Link Backlog",
7844
+ description: "List unresolved See Also concepts from published Transparent Commons pages. Use this after search/lookup when an agent needs to grow the graph: each result names a concept that appears in See Also but does not yet have a resolved Commons entityId or /wiki/ slug. This is platform Commons graph data, not personal Memory storage.",
7845
+ inputSchema: CommonsListNeedsLinksInputSchema,
7846
+ outputSchema: recordOutputSchema("commons_list_needs_links", CommonsGenericOutputSchema),
7847
+ annotations: {
7848
+ title: "Transparent Commons Needs-Link Backlog",
7849
+ readOnlyHint: true,
7850
+ destructiveHint: false,
7851
+ idempotentHint: true,
7852
+ openWorldHint: false
7853
+ }
7854
+ }, async (input) => executor.commonsListNeedsLinks(input));
7855
+ server.registerTool("commons_prepare_entity", {
7856
+ title: "Transparent Commons Prepare Entity",
7857
+ description: "Memory-style planning pass for a Transparent Commons public wiki entity. Returns the live entity profile contract, recommended and optional sections, duplicate candidates, tag/keyword reuse guidance, heading diagnostics, and instructions. This is read-only and should be called before composing or submitting normal Commons writes.",
7858
+ inputSchema: CommonsPrepareEntityInputSchema,
7859
+ outputSchema: recordOutputSchema("commons_prepare_entity", CommonsGenericOutputSchema),
7860
+ annotations: {
7861
+ title: "Transparent Commons Prepare Entity",
7862
+ readOnlyHint: true,
7863
+ destructiveHint: false,
7864
+ idempotentHint: true,
7865
+ openWorldHint: false
7866
+ }
7867
+ }, async (input) => executor.commonsPrepareEntity(input));
7868
+ server.registerTool("commons_validate_entity", {
7869
+ title: "Transparent Commons Validate Entity",
7870
+ description: "Validate a proposed Transparent Commons entity payload without writing. Checks publishable basics, featured image, source/body evidence, existing-entity conflict state, heading profile alignment, and unsupported placeholder sections. Call this after composing the page and before commons_submit_entity.",
7871
+ inputSchema: CommonsValidateEntityInputSchema,
7872
+ outputSchema: recordOutputSchema("commons_validate_entity", CommonsGenericOutputSchema),
7873
+ annotations: {
7874
+ title: "Transparent Commons Validate Entity",
7875
+ readOnlyHint: true,
7876
+ destructiveHint: false,
7877
+ idempotentHint: true,
7878
+ openWorldHint: false
7879
+ }
7880
+ }, async (input) => executor.commonsValidateEntity(input));
7881
+ server.registerTool("commons_submit_entity", {
7882
+ title: "Transparent Commons Governed Entity Write",
7883
+ description: "Create or propose an edit to a Transparent Commons public wiki entity through the governed MCP Scraper write plane. This never edits rendered HTML directly. Normal workflow is commons_prepare_entity, compose, commons_validate_entity, then submit. Choose a precise entityType and write a neutral encyclopedia projection with the matching entity structure, not a blog article or raw scrape dump. Use H2 sections and H3/H4/H5 subitems; every heading appears in the public page menu. Omit unsupported sections instead of publishing empty/filler headings. It writes a proposal, records a contribution ledger entry when accepted, and auto-publishes only safe non-conflicting changes with a featured image and source/body evidence. Existing entity edits require baseRevision to auto-publish. Requires idempotencyKey.",
7884
+ inputSchema: CommonsSubmitEntityInputSchema,
7885
+ outputSchema: recordOutputSchema("commons_submit_entity", CommonsGenericOutputSchema),
7886
+ annotations: {
7887
+ title: "Transparent Commons Governed Entity Write",
7888
+ readOnlyHint: false,
7889
+ destructiveHint: false,
7890
+ idempotentHint: true,
7891
+ openWorldHint: false
7892
+ }
7893
+ }, async (input) => executor.commonsSubmitEntity(input));
7894
+ server.registerTool("commons_get_entity_ledger", {
7895
+ title: "Transparent Commons Contribution Ledger",
7896
+ description: "Read the public contribution ledger for one published Transparent Commons wiki entity. Use this to see which MCP/frontend/API actor contributed, when, and which fields changed.",
7897
+ inputSchema: CommonsGetEntityLedgerInputSchema,
7898
+ outputSchema: recordOutputSchema("commons_get_entity_ledger", CommonsGenericOutputSchema),
7899
+ annotations: {
7900
+ title: "Transparent Commons Contribution Ledger",
7901
+ readOnlyHint: true,
7902
+ destructiveHint: false,
7903
+ idempotentHint: true,
7904
+ openWorldHint: false
7905
+ }
7906
+ }, async (input) => executor.commonsGetEntityLedger(input));
7907
+ server.registerTool("commons_save_filter", {
7908
+ title: "Transparent Commons Saved MCP Filter",
7909
+ description: "Save or update an account-scoped Commons search filter so one MCP can behave like many personalized reading rooms, trails, source scopes, categories, or tag bundles. Reusing a filter name updates it.",
7910
+ inputSchema: CommonsSaveFilterInputSchema,
7911
+ outputSchema: recordOutputSchema("commons_save_filter", CommonsGenericOutputSchema),
7912
+ annotations: {
7913
+ title: "Transparent Commons Saved MCP Filter",
7914
+ readOnlyHint: false,
7915
+ destructiveHint: false,
7916
+ idempotentHint: true,
7917
+ openWorldHint: false
7918
+ }
7919
+ }, async (input) => executor.commonsSaveFilter(input));
7920
+ server.registerTool("commons_list_filters", {
7921
+ title: "Transparent Commons List Saved Filters",
7922
+ description: "List account-scoped Commons filters. Pass a returned filter id to commons_search_entities to search only that reading room, trail, source scope, category, or tag bundle.",
7923
+ inputSchema: CommonsListFiltersInputSchema,
7924
+ outputSchema: recordOutputSchema("commons_list_filters", CommonsGenericOutputSchema),
7925
+ annotations: {
7926
+ title: "Transparent Commons List Saved Filters",
7927
+ readOnlyHint: true,
7928
+ destructiveHint: false,
7929
+ idempotentHint: true,
7930
+ openWorldHint: false
7931
+ }
7932
+ }, async (input) => executor.commonsListFilters(input));
7505
7933
  server.registerTool("directory_workflow", {
7506
7934
  title: "Directory Workflow: Markets + Maps",
7507
7935
  description: `Start a durable directory/prospecting job: selects US city markets from versioned hosted Census-place data, optionally joins the active hosted ZIP dataset, then runs Google Maps business searches per city. Pass a new idempotencyKey for each intended job and reuse it only when retrying that call. Production does not read server-local location CSVs. Always returns a background jobId; poll with directory_workflow_status. ${fileBehavior("Saves a CSV of results per city.", "Completed jobs return an owner-scoped CSV artifact.")}`,
@@ -7520,6 +7948,62 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
7520
7948
  outputSchema: recordOutputSchema("directory_workflow_status", DirectoryWorkflowOutputSchema),
7521
7949
  annotations: localPlanningToolAnnotations("Directory Workflow Status")
7522
7950
  }, async (input) => formatDirectoryWorkflow(await executor.directoryWorkflowStatus(input), input, ctx));
7951
+ server.registerTool("get-local-sourcebook-contract", {
7952
+ title: "Get Local Sourcebook Contract",
7953
+ description: "Read the governed listing purpose, supported categories, canonical profile/review routes, required sections, acquisition limits, tag policy, ownership boundary, and admin-only publication rule. Call this before composing a listing when its required shape is uncertain.",
7954
+ inputSchema: GetLocalSourcebookContractInputSchema,
7955
+ outputSchema: recordOutputSchema("get-local-sourcebook-contract", LocalSourcebookOutputSchema),
7956
+ annotations: localPlanningToolAnnotations("Get Local Sourcebook Contract")
7957
+ }, async (input) => executor.getLocalSourcebookContract(input));
7958
+ server.registerTool("list-local-sourcebook-tags", {
7959
+ title: "List Local Sourcebook Tags",
7960
+ description: "List the complete live canonical directory vocabulary, aliases, lifecycle status, and usage counts. Always call this before proposing, resolving, validating, or capturing listing tags so categories and filters do not fragment.",
7961
+ inputSchema: ListLocalSourcebookTagsInputSchema,
7962
+ outputSchema: recordOutputSchema("list-local-sourcebook-tags", LocalSourcebookOutputSchema),
7963
+ annotations: localPlanningToolAnnotations("List Local Sourcebook Tags")
7964
+ }, async (input) => executor.listLocalSourcebookTags(input));
7965
+ server.registerTool("resolve-local-sourcebook-tags", {
7966
+ title: "Resolve Local Sourcebook Tags",
7967
+ description: "Resolve proposed business concepts against the live directory vocabulary. Returns reuse, review, create, or omit; near matches require an explicit canonical choice and new tags require central, reusable justification.",
7968
+ inputSchema: ResolveLocalSourcebookTagsInputSchema,
7969
+ outputSchema: recordOutputSchema("resolve-local-sourcebook-tags", LocalSourcebookOutputSchema),
7970
+ annotations: localPlanningToolAnnotations("Resolve Local Sourcebook Tags")
7971
+ }, async (input) => executor.resolveLocalSourcebookTags(input));
7972
+ server.registerTool("prepare-local-sourcebook-write", {
7973
+ title: "Prepare Local Sourcebook Write",
7974
+ description: "Mandatory planning pass for a new listing. Returns the category contract, canonical profile and review routes, normalized identity, live tag resolutions, and exact next instructions. Inspect list-local-sourcebook-tags first, then validate the returned proposal before capture.",
7975
+ inputSchema: PrepareLocalSourcebookWriteInputSchema,
7976
+ outputSchema: recordOutputSchema("prepare-local-sourcebook-write", LocalSourcebookOutputSchema),
7977
+ annotations: localPlanningToolAnnotations("Prepare Local Sourcebook Write")
7978
+ }, async (input) => executor.prepareLocalSourcebookWrite(input));
7979
+ server.registerTool("validate-local-sourcebook-write", {
7980
+ title: "Validate Local Sourcebook Write",
7981
+ description: "Validate a proposed new listing or complete owner draft revision without writing it. Checks identity or listing completeness, canonical tags, tag decisions, and baseRevision requirements. Capture only when valid is true.",
7982
+ inputSchema: ValidateLocalSourcebookWriteInputSchema,
7983
+ outputSchema: recordOutputSchema("validate-local-sourcebook-write", LocalSourcebookOutputSchema),
7984
+ annotations: localPlanningToolAnnotations("Validate Local Sourcebook Write")
7985
+ }, async (input) => executor.validateLocalSourcebookWrite(input));
7986
+ server.registerTool("local-sourcebook-capture", {
7987
+ title: "Capture Governed Local Sourcebook Listing",
7988
+ description: "Strict owner-scoped write path after list, contract, prepare, and validate. A new capture registers canonical tags and queues paid website, exact-place, review, service-area, staff, and genuine-media acquisition. An edit requires the current baseRevision. Capture never publishes; admin review remains required.",
7989
+ inputSchema: LocalSourcebookCaptureInputSchema,
7990
+ outputSchema: recordOutputSchema("local-sourcebook-capture", LocalSourcebookOutputSchema),
7991
+ annotations: liveWebToolAnnotations("Capture Governed Local Sourcebook Listing")
7992
+ }, async (input) => executor.localSourcebookCapture(input));
7993
+ server.registerTool("local_sourcebook_submission_status", {
7994
+ title: "Local Sourcebook Submission Status",
7995
+ description: "Read the authenticated caller\u2019s listing draft, enrichment coverage, immutable revision number, and publication state.",
7996
+ inputSchema: LocalSourcebookSubmissionStatusInputSchema,
7997
+ outputSchema: recordOutputSchema("local_sourcebook_submission_status", LocalSourcebookOutputSchema),
7998
+ annotations: localPlanningToolAnnotations("Local Sourcebook Submission Status")
7999
+ }, async (input) => executor.localSourcebookSubmissionStatus(input));
8000
+ server.registerTool("local_sourcebook_refresh", {
8001
+ title: "Refresh a Local Sourcebook Listing",
8002
+ description: "Queue a new broad crawl and review/media acquisition pass for a listing owned by the authenticated MCP Scraper account.",
8003
+ inputSchema: LocalSourcebookRefreshInputSchema,
8004
+ outputSchema: recordOutputSchema("local_sourcebook_refresh", LocalSourcebookOutputSchema),
8005
+ annotations: liveWebToolAnnotations("Refresh a Local Sourcebook Listing")
8006
+ }, async (input) => executor.localSourcebookRefresh(input));
7523
8007
  server.registerTool("location_markets", {
7524
8008
  title: "Hosted US Markets + ZIP Groups",
7525
8009
  description: "Query versioned hosted US Census-place population and ZIP/county groups by state, city, ZIP, population year, and minimum population. Read-only and free; returns exact dataset IDs and refresh timestamps for provenance. Use this to inspect or plan markets before directory_workflow.",
@@ -8102,6 +8586,36 @@ var HttpMcpToolExecutor = class {
8102
8586
  directoryWorkflowStatus(input) {
8103
8587
  return this.getJson(`/directory/jobs/${encodeURIComponent(input.jobId)}`);
8104
8588
  }
8589
+ localSourcebookSubmit(input) {
8590
+ return this.call("/local-sourcebook/submissions", input);
8591
+ }
8592
+ localSourcebookSubmissionStatus(input) {
8593
+ return this.getJson(`/local-sourcebook/submissions/${encodeURIComponent(input.submissionId)}`);
8594
+ }
8595
+ localSourcebookUpdateDraft(input) {
8596
+ return this.call(`/local-sourcebook/submissions/${encodeURIComponent(input.submissionId)}/draft`, { payload: input.payload });
8597
+ }
8598
+ localSourcebookRefresh(input) {
8599
+ return this.call(`/local-sourcebook/submissions/${encodeURIComponent(input.submissionId)}/refresh`, {});
8600
+ }
8601
+ getLocalSourcebookContract(input) {
8602
+ return this.getJson(`/local-sourcebook/contract${input.category ? `/${encodeURIComponent(input.category)}` : ""}`);
8603
+ }
8604
+ listLocalSourcebookTags(input) {
8605
+ return this.getJson(`/local-sourcebook/tags?includeDeprecated=${input.includeDeprecated !== false ? "true" : "false"}`);
8606
+ }
8607
+ resolveLocalSourcebookTags(input) {
8608
+ return this.call("/local-sourcebook/tags/resolve", input);
8609
+ }
8610
+ prepareLocalSourcebookWrite(input) {
8611
+ return this.call("/local-sourcebook/prepare", input);
8612
+ }
8613
+ validateLocalSourcebookWrite(input) {
8614
+ return this.call("/local-sourcebook/validate", input);
8615
+ }
8616
+ localSourcebookCapture(input) {
8617
+ return this.call("/local-sourcebook/capture", input);
8618
+ }
8105
8619
  locationMarkets(input) {
8106
8620
  const query = new URLSearchParams({
8107
8621
  state: input.state,
@@ -8206,6 +8720,54 @@ var HttpMcpToolExecutor = class {
8206
8720
  renewEditorialReadingRoomDownload(input) {
8207
8721
  return this.call("/editorial-reading-room/renew-download", input);
8208
8722
  }
8723
+ commonsSearchEntities(input) {
8724
+ return this.call("/commons/entities/search", input);
8725
+ }
8726
+ async commonsGetEntity(input) {
8727
+ const result = await this.getJson(`/commons/entities/${encodeURIComponent(input.idOrSlug)}`);
8728
+ if (result.isError || input.includeWikiPage === false) return result;
8729
+ const pageResult = await this.getJson(`/commons/entities/${encodeURIComponent(input.idOrSlug)}/wiki-page`);
8730
+ if (pageResult.isError) return result;
8731
+ try {
8732
+ const entityPayload = JSON.parse(result.content[0]?.type === "text" ? result.content[0].text : "{}");
8733
+ const pagePayload = JSON.parse(pageResult.content[0]?.type === "text" ? pageResult.content[0].text : "{}");
8734
+ return {
8735
+ content: [{
8736
+ type: "text",
8737
+ text: JSON.stringify({
8738
+ ...entityPayload,
8739
+ wikiPage: pagePayload.data ?? null
8740
+ })
8741
+ }]
8742
+ };
8743
+ } catch {
8744
+ return result;
8745
+ }
8746
+ }
8747
+ commonsPrepareEntity(input) {
8748
+ return this.call("/commons/entities/prepare", input);
8749
+ }
8750
+ commonsValidateEntity(input) {
8751
+ return this.call("/commons/entities/validate", input);
8752
+ }
8753
+ commonsSubmitEntity(input) {
8754
+ const { idempotencyKey, ...body } = input;
8755
+ return this.call("/commons/entities/propose", { ...body, idempotencyKey }, this.timeoutMs, "POST", {
8756
+ "Idempotency-Key": `commons-${createHash4("sha256").update(idempotencyKey).digest("hex")}`
8757
+ });
8758
+ }
8759
+ commonsGetEntityLedger(input) {
8760
+ return this.getJson(`/commons/entities/${encodeURIComponent(input.idOrSlug)}/ledger`);
8761
+ }
8762
+ commonsSaveFilter(input) {
8763
+ return this.call("/commons/filters", input);
8764
+ }
8765
+ commonsListFilters(_input) {
8766
+ return this.getJson("/commons/filters");
8767
+ }
8768
+ commonsListNeedsLinks(input) {
8769
+ return this.call("/commons/needs-links/search", input);
8770
+ }
8209
8771
  async captureSerpSnapshot(input) {
8210
8772
  const fingerprint = createHash4("sha256").update(JSON.stringify(input)).digest("hex");
8211
8773
  const now = Date.now();
@@ -12684,4 +13246,4 @@ export {
12684
13246
  ScheduledResultsMcpExecutor,
12685
13247
  registerScheduledResultsMcpTools
12686
13248
  };
12687
- //# sourceMappingURL=chunk-3FKUKMNE.js.map
13249
+ //# sourceMappingURL=chunk-HH5CE5LP.js.map