@extenshi/mcp
Version:
Extenshi MCP server — bring the extension catalog (search, security, market research) and pre-publish scanning into your AI tools
72 lines • 2.62 kB
TypeScript
/**
* Compact reads of the hosted landing page (DX report 2026-10-10 §2 row 15).
*
* `get_landing_page` returns the form the live version was rendered from. With
* eleven locales and an inline logo that form is ~80 KB — more than an MCP
* response carries. So the tool answers with a summary by default (what is
* live, which locales and sections exist, how big each part is) and returns
* the form only on request, optionally narrowed to some top-level fields and
* some translations.
*
* Shaped here, from the response the BFF already sends, rather than in the BFF:
* every BFF version returns the same full form, so this works against an old
* BFF and a new one alike, and the BFF contract does not change.
*/
import { z } from 'zod';
export declare const LANDING_READ_VIEWS: readonly ["summary", "full"];
export type LandingReadView = (typeof LANDING_READ_VIEWS)[number];
/** get_landing_page parameters besides projectId. */
export declare const LANDING_READ_SHAPE: {
view: z.ZodOptional<z.ZodEnum<["summary", "full"]>>;
fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
locales: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
};
export interface LandingReadOptions {
view?: LandingReadView;
/** Top-level form keys to keep in a full read (e.g. `sections`, `seo`). */
fields?: readonly string[];
/** Translations to keep in `form.locales` in a full read (`de`, `pt-BR`). The base content is always kept. */
locales?: readonly string[];
}
type Json = Record<string, unknown>;
/** What an agent decides from before asking for the form itself. */
export declare function summarizeLandingForm(form: Json): {
bytes: number;
schemaVersion: {};
extensionName: unknown;
tagline: unknown;
theme: unknown;
accentColor: unknown;
defaultLocale: string;
translations: {
locale: string;
bytes: number;
}[];
sections: {
bytes: number;
hidden?: boolean | undefined;
index: number;
id: unknown;
type: unknown;
}[];
links: {
[k: string]: string;
};
logo: {
kind: "svg" | "data-url" | "url" | "none";
bytes: number;
};
features: number;
screenshots: number;
fields: {
field: string;
bytes: number;
}[];
};
/**
* Shape a `getLandingPage` response for the agent. Anything that is not the
* expected `{ page, url, form }` object passes through untouched.
*/
export declare function shapeLandingRead(result: unknown, options?: LandingReadOptions): unknown;
export {};
//# sourceMappingURL=landing-read.d.ts.map