@typeship-ax/mcp 0.6.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.
- package/LICENSE +9 -0
- package/README.md +43 -0
- package/api.json +5163 -0
- package/api.md +512 -0
- package/dist/core/http.d.ts +303 -0
- package/dist/core/http.d.ts.map +1 -0
- package/dist/core/http.js +770 -0
- package/dist/core/pagination.d.ts +51 -0
- package/dist/core/pagination.d.ts.map +1 -0
- package/dist/core/pagination.js +154 -0
- package/dist/dates.d.ts +33 -0
- package/dist/dates.d.ts.map +1 -0
- package/dist/dates.js +136 -0
- package/dist/errors.d.ts +81 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +103 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/mcp-protocol.d.ts +453 -0
- package/dist/mcp-protocol.d.ts.map +1 -0
- package/dist/mcp-protocol.js +1262 -0
- package/dist/mcp.d.ts +5 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +449 -0
- package/dist/ops.d.ts +115 -0
- package/dist/ops.d.ts.map +1 -0
- package/dist/ops.js +79 -0
- package/dist/resources/account.d.ts +18 -0
- package/dist/resources/account.d.ts.map +1 -0
- package/dist/resources/account.js +26 -0
- package/dist/resources/api-keys.d.ts +37 -0
- package/dist/resources/api-keys.d.ts.map +1 -0
- package/dist/resources/api-keys.js +67 -0
- package/dist/resources/generate.d.ts +25 -0
- package/dist/resources/generate.d.ts.map +1 -0
- package/dist/resources/generate.js +41 -0
- package/dist/resources/generations.d.ts +31 -0
- package/dist/resources/generations.d.ts.map +1 -0
- package/dist/resources/generations.js +56 -0
- package/dist/resources/projects.d.ts +110 -0
- package/dist/resources/projects.d.ts.map +1 -0
- package/dist/resources/projects.js +220 -0
- package/dist/resources/spec-revisions.d.ts +47 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +90 -0
- package/dist/schemas.d.ts +6 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +88 -0
- package/dist/types.d.ts +759 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +37 -0
- package/dist/worker.d.ts +5 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +12 -0
- package/package.json +45 -0
- package/src/core/http.ts +1008 -0
- package/src/core/pagination.ts +195 -0
- package/src/dates.ts +126 -0
- package/src/errors.ts +117 -0
- package/src/index.ts +153 -0
- package/src/mcp-protocol.ts +1451 -0
- package/src/mcp.ts +448 -0
- package/src/ops.ts +174 -0
- package/src/resources/account.ts +43 -0
- package/src/resources/api-keys.ts +105 -0
- package/src/resources/generate.ts +69 -0
- package/src/resources/generations.ts +100 -0
- package/src/resources/projects.ts +391 -0
- package/src/resources/spec-revisions.ts +150 -0
- package/src/schemas.ts +90 -0
- package/src/types.ts +825 -0
- package/src/worker.ts +13 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// typeship — client entry point.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { HttpCore, formatDebugEvent, bearerAuth, } from "./core/http.js";
|
|
4
|
+
import { DEFS, SCHEMAS } from "./schemas.js";
|
|
5
|
+
import { GenerateResource } from "./resources/generate.js";
|
|
6
|
+
import { ProjectsResource } from "./resources/projects.js";
|
|
7
|
+
import { GenerationsResource } from "./resources/generations.js";
|
|
8
|
+
import { SpecRevisionsResource } from "./resources/spec-revisions.js";
|
|
9
|
+
import { AccountResource } from "./resources/account.js";
|
|
10
|
+
import { ApiKeysResource } from "./resources/api-keys.js";
|
|
11
|
+
/** This package's version, also sent as the `User-Agent`. */
|
|
12
|
+
export const VERSION = "0.6.0";
|
|
13
|
+
const USER_AGENT = "@typeship-ax/mcp/0.6.0 (typeship)";
|
|
14
|
+
/**
|
|
15
|
+
* typeship — v0.6.0
|
|
16
|
+
*
|
|
17
|
+
* Generate production SDKs, CLIs, and MCP servers from an OpenAPI or
|
|
18
|
+
* GraphQL spec, and keep every selected output current.
|
|
19
|
+
*
|
|
20
|
+
* Every operation but one requires an API key, created in the console and
|
|
21
|
+
* sent as `Authorization: Bearer ak_...`. A browser session is not a
|
|
22
|
+
* credential for this API. The exception is POST /generate, which works
|
|
23
|
+
* anonymously with the free plan's limits.
|
|
24
|
+
*/
|
|
25
|
+
export class TypeshipClient {
|
|
26
|
+
generate;
|
|
27
|
+
projects;
|
|
28
|
+
generations;
|
|
29
|
+
specRevisions;
|
|
30
|
+
account;
|
|
31
|
+
apiKeys;
|
|
32
|
+
constructor(options = {}) {
|
|
33
|
+
// Identifies this package to the API (ignored by browsers, which
|
|
34
|
+
// control their own User-Agent); override via defaultHeaders.
|
|
35
|
+
const headers = { "User-Agent": USER_AGENT, ...options.defaultHeaders };
|
|
36
|
+
const debugOption = options.debug
|
|
37
|
+
?? (typeof process !== "undefined" && process.env?.["TYPESHIP_DEBUG"] === "1");
|
|
38
|
+
const debug = typeof debugOption === "function"
|
|
39
|
+
? debugOption
|
|
40
|
+
: debugOption === true
|
|
41
|
+
? (event) => console.error(formatDebugEvent("typeship", event))
|
|
42
|
+
: undefined;
|
|
43
|
+
const query = {};
|
|
44
|
+
if (options.bearerToken !== undefined)
|
|
45
|
+
headers["Authorization"] = bearerAuth(options.bearerToken);
|
|
46
|
+
const v = options.validate;
|
|
47
|
+
const validate = v
|
|
48
|
+
? {
|
|
49
|
+
requests: typeof v === "object" ? v.requests !== false : true,
|
|
50
|
+
responses: typeof v === "object" ? v.responses !== false : true,
|
|
51
|
+
mode: (typeof v === "object" && v.mode) || "throw",
|
|
52
|
+
}
|
|
53
|
+
: undefined;
|
|
54
|
+
const core = new HttpCore({
|
|
55
|
+
baseUrl: options.baseUrl ?? "https://typeship.dev/api/v1",
|
|
56
|
+
headers,
|
|
57
|
+
query,
|
|
58
|
+
fetch: options.fetch ?? fetch,
|
|
59
|
+
timeoutMs: options.timeoutMs ?? 30_000,
|
|
60
|
+
maxRetries: options.maxRetries ?? 2,
|
|
61
|
+
onRequest: options.onRequest,
|
|
62
|
+
onResponse: options.onResponse,
|
|
63
|
+
onError: options.onError,
|
|
64
|
+
debug,
|
|
65
|
+
validate,
|
|
66
|
+
schemas: validate ? SCHEMAS : undefined,
|
|
67
|
+
schemaDefs: validate ? DEFS : undefined,
|
|
68
|
+
});
|
|
69
|
+
this.generate = new GenerateResource(core);
|
|
70
|
+
this.projects = new ProjectsResource(core);
|
|
71
|
+
this.generations = new GenerationsResource(core);
|
|
72
|
+
this.specRevisions = new SpecRevisionsResource(core);
|
|
73
|
+
this.account = new AccountResource(core);
|
|
74
|
+
this.apiKeys = new ApiKeysResource(core);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export * from "./types.js";
|
|
78
|
+
export * from "./errors.js";
|
|
79
|
+
export { formatDebugEvent, } from "./core/http.js";
|
|
80
|
+
export { Page, PagePromise } from "./core/pagination.js";
|
|
81
|
+
export * from "./resources/generate.js";
|
|
82
|
+
export * from "./resources/projects.js";
|
|
83
|
+
export * from "./resources/generations.js";
|
|
84
|
+
export * from "./resources/spec-revisions.js";
|
|
85
|
+
export * from "./resources/account.js";
|
|
86
|
+
export * from "./resources/api-keys.js";
|
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP 2026-07-28 for a tools-only server. Generated by typeship — https://typeship.dev
|
|
3
|
+
*
|
|
4
|
+
* The protocol layer shared by the MCP server in every generated package and
|
|
5
|
+
* by typeship's hosted endpoint: JSON-RPC shape checks, the per-request _meta
|
|
6
|
+
* rules, Streamable HTTP header validation, result wrapping, and the tool
|
|
7
|
+
* surface (per-operation tools or the three-tool "meta" shape, plus the
|
|
8
|
+
* search_docs / read_docs pair). Also the agent-facing contract of a tool
|
|
9
|
+
* call: argument validation and coercion against the tool's input schema
|
|
10
|
+
* (relative dates via ./dates), field projection, a size cap on results,
|
|
11
|
+
* and error results that carry a stable code and next steps. Transport,
|
|
12
|
+
* credentials, and how a tool call reaches the API stay with the caller.
|
|
13
|
+
* No external dependencies.
|
|
14
|
+
*
|
|
15
|
+
* Spec: https://modelcontextprotocol.io/specification/2026-07-28
|
|
16
|
+
*/
|
|
17
|
+
export declare const MCP_PROTOCOL_VERSION = "2026-07-28";
|
|
18
|
+
/** Revisions served. Legacy (initialize-handshake) revisions are not; an
|
|
19
|
+
* initialize request gets an error naming this list, as the spec asks of
|
|
20
|
+
* modern-only servers. */
|
|
21
|
+
export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
|
|
22
|
+
export declare const META_VERSION = "io.modelcontextprotocol/protocolVersion";
|
|
23
|
+
export declare const META_CLIENT_CAPS = "io.modelcontextprotocol/clientCapabilities";
|
|
24
|
+
export declare const META_SERVER_INFO = "io.modelcontextprotocol/serverInfo";
|
|
25
|
+
/** Results longer than this (in characters of JSON text) are cut down to
|
|
26
|
+
* whole items or whole keys with a note saying what was left out and how to
|
|
27
|
+
* ask for less. Roughly 16k tokens: under every major client's own cap, so
|
|
28
|
+
* the agent sees this explanation instead of a mid-JSON chop. */
|
|
29
|
+
export declare const DEFAULT_MAX_RESULT_CHARS = 64000;
|
|
30
|
+
export interface ServerInfo {
|
|
31
|
+
name: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
version: string;
|
|
34
|
+
/** The API's docs or home page, for clients that show one. */
|
|
35
|
+
websiteUrl?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ToolAnnotations {
|
|
38
|
+
title?: string;
|
|
39
|
+
readOnlyHint?: boolean;
|
|
40
|
+
destructiveHint?: boolean;
|
|
41
|
+
idempotentHint?: boolean;
|
|
42
|
+
openWorldHint?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface ToolDefinition {
|
|
45
|
+
name: string;
|
|
46
|
+
title?: string;
|
|
47
|
+
description: string;
|
|
48
|
+
inputSchema: Record<string, unknown>;
|
|
49
|
+
outputSchema?: Record<string, unknown>;
|
|
50
|
+
annotations?: ToolAnnotations;
|
|
51
|
+
}
|
|
52
|
+
/** A content block of a tool result (the subset this server emits). */
|
|
53
|
+
export type ContentBlock = {
|
|
54
|
+
type: "text";
|
|
55
|
+
text: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: "image";
|
|
58
|
+
data: string;
|
|
59
|
+
mimeType: string;
|
|
60
|
+
} | {
|
|
61
|
+
type: "resource";
|
|
62
|
+
resource: {
|
|
63
|
+
uri: string;
|
|
64
|
+
mimeType?: string;
|
|
65
|
+
blob?: string;
|
|
66
|
+
text?: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/** What a tool call produced: text for every client, the JSON value behind
|
|
70
|
+
* it for structuredContent, whether it is a tool execution error, and,
|
|
71
|
+
* for binary results, the content blocks that replace the one text block. */
|
|
72
|
+
export interface ToolOutcome {
|
|
73
|
+
text: string;
|
|
74
|
+
isError: boolean;
|
|
75
|
+
structured?: unknown;
|
|
76
|
+
content?: ContentBlock[];
|
|
77
|
+
}
|
|
78
|
+
/** The subset of an operation spec (ops.ts / the hosted manifest) the
|
|
79
|
+
* protocol layer reads. */
|
|
80
|
+
export interface OpLike {
|
|
81
|
+
tool: string;
|
|
82
|
+
/** SDK resource and method names (accounts, list). */
|
|
83
|
+
resource?: string;
|
|
84
|
+
method?: string;
|
|
85
|
+
httpMethod: string;
|
|
86
|
+
path: string;
|
|
87
|
+
summary?: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
toolDescription: string;
|
|
90
|
+
paginated: boolean;
|
|
91
|
+
/** GraphQL ops accept a raw selection-set override. */
|
|
92
|
+
select: boolean;
|
|
93
|
+
graphql?: {
|
|
94
|
+
kind: string;
|
|
95
|
+
};
|
|
96
|
+
params: {
|
|
97
|
+
name: string;
|
|
98
|
+
type: string;
|
|
99
|
+
required: boolean;
|
|
100
|
+
enum?: string[];
|
|
101
|
+
description?: string;
|
|
102
|
+
}[];
|
|
103
|
+
inputSchema: Record<string, unknown>;
|
|
104
|
+
outputSchema?: Record<string, unknown>;
|
|
105
|
+
/** Canonical effect classification shared by generated docs, CLI, and MCP. */
|
|
106
|
+
safety?: "read" | "write" | "destructive";
|
|
107
|
+
/** Whether the operation accepts or requires an API credential. */
|
|
108
|
+
auth?: "required" | "optional" | "none";
|
|
109
|
+
/** Schema-derived, valid wire arguments for examples and agent discovery. */
|
|
110
|
+
exampleArguments?: Record<string, unknown>;
|
|
111
|
+
/** Page-walking config (same shape as the SDK's PageConfig), when paginated. */
|
|
112
|
+
pagination?: {
|
|
113
|
+
style: string;
|
|
114
|
+
itemsField: string;
|
|
115
|
+
cursorParam?: string;
|
|
116
|
+
idField?: string;
|
|
117
|
+
pageParam?: string;
|
|
118
|
+
offsetParam?: string;
|
|
119
|
+
limitParam?: string;
|
|
120
|
+
};
|
|
121
|
+
/** Success body is a text/event-stream. */
|
|
122
|
+
sse?: boolean;
|
|
123
|
+
/** Wire encoding of the request body. */
|
|
124
|
+
bodyKind?: string | null;
|
|
125
|
+
}
|
|
126
|
+
/** Does the operation take a file (multipart form or raw binary body)? */
|
|
127
|
+
export declare function isUploadOp(op: OpLike): boolean;
|
|
128
|
+
/** Ops that can be MCP tools. A tool result is one value, not a stream, so
|
|
129
|
+
* event streams stay CLI/SDK-only everywhere. Uploads need a local file:
|
|
130
|
+
* they are tools on a server running on the agent's machine (stdio, or a
|
|
131
|
+
* locally launched HTTP server), where a file argument is a path the server
|
|
132
|
+
* reads, and not on a remote endpoint, which can't see the agent's disk. */
|
|
133
|
+
export declare function mcpExposed(op: OpLike, options?: {
|
|
134
|
+
uploads?: boolean;
|
|
135
|
+
}): boolean;
|
|
136
|
+
export interface JsonRpcMessage {
|
|
137
|
+
jsonrpc?: string;
|
|
138
|
+
id?: number | string | null;
|
|
139
|
+
method: string;
|
|
140
|
+
params?: Record<string, unknown>;
|
|
141
|
+
}
|
|
142
|
+
/** What handleRpc hands back: the JSON-RPC message to send (null for a
|
|
143
|
+
* notification) and the HTTP status the Streamable HTTP transport should
|
|
144
|
+
* use for it (stdio ignores it). */
|
|
145
|
+
export interface RpcOutcome {
|
|
146
|
+
message: Record<string, unknown> | null;
|
|
147
|
+
status: number;
|
|
148
|
+
}
|
|
149
|
+
/** What the caller supplies: identity, the tool list, and how to run one. */
|
|
150
|
+
export interface McpServer {
|
|
151
|
+
serverInfo: ServerInfo;
|
|
152
|
+
/** Natural-language guidance for LLMs, returned by server/discover. */
|
|
153
|
+
instructions?: string;
|
|
154
|
+
/** How long clients may cache tools/list (ms). */
|
|
155
|
+
toolsTtlMs: number;
|
|
156
|
+
/** "public" when the tool list is the same for every caller. */
|
|
157
|
+
cacheScope?: "public" | "private";
|
|
158
|
+
listTools(): ToolDefinition[];
|
|
159
|
+
/**
|
|
160
|
+
* Run a tool. Return undefined for an unknown tool (the client gets
|
|
161
|
+
* -32602), a ToolOutcome otherwise. Throwing yields -32603.
|
|
162
|
+
*/
|
|
163
|
+
callTool(name: string, args: Record<string, unknown>): Promise<ToolOutcome | undefined>;
|
|
164
|
+
/** Called before a tool runs; a non-null outcome is sent instead
|
|
165
|
+
* (rate limiting, entitlement). */
|
|
166
|
+
beforeToolCall?(name: string): Promise<RpcOutcome | null> | RpcOutcome | null;
|
|
167
|
+
/** Called after a tool ran, with wall time. Observability only. */
|
|
168
|
+
afterToolCall?(name: string, outcome: ToolOutcome, durationMs: number): Promise<void> | void;
|
|
169
|
+
}
|
|
170
|
+
export declare const rpcError: (id: unknown, code: number, message: string, status: number, data?: unknown) => RpcOutcome;
|
|
171
|
+
/** Shape check before anything else: batches (removed in 2025-06-18) and
|
|
172
|
+
* non-objects get an error instead of a dead server. */
|
|
173
|
+
export declare function asJsonRpc(message: unknown): JsonRpcMessage | RpcOutcome;
|
|
174
|
+
export declare function isRpcOutcome(value: JsonRpcMessage | RpcOutcome): value is RpcOutcome;
|
|
175
|
+
/** Per-request protocol metadata (2026-07-28 basic/_meta): protocolVersion
|
|
176
|
+
* and clientCapabilities are REQUIRED on every request. Missing -> -32602
|
|
177
|
+
* (400 on HTTP); unsupported version -> -32022 listing what we speak. */
|
|
178
|
+
export declare function checkRequestMeta(request: JsonRpcMessage): RpcOutcome | {
|
|
179
|
+
version: string;
|
|
180
|
+
};
|
|
181
|
+
/** Streamable HTTP header values may arrive as =?base64?...?= when not
|
|
182
|
+
* header-safe. atob + TextDecoder: works in Node and worker runtimes alike. */
|
|
183
|
+
export declare function decodeHeaderValue(value: string): string;
|
|
184
|
+
/** Streamable HTTP mirrors body fields into headers so intermediaries can
|
|
185
|
+
* route without parsing; a server that reads the body MUST check they
|
|
186
|
+
* agree (400 + -32020 HeaderMismatch), including when they're missing.
|
|
187
|
+
* Notifications carry no header requirements; call this for requests. */
|
|
188
|
+
export declare function checkRequestHeaders(headers: {
|
|
189
|
+
get(name: string): string | null;
|
|
190
|
+
}, message: JsonRpcMessage): RpcOutcome | null;
|
|
191
|
+
/** True (and forgets the id) when a response must be suppressed. */
|
|
192
|
+
export declare function takeCancelled(id: unknown): boolean;
|
|
193
|
+
export declare function handleRpc(server: McpServer, incoming: unknown): Promise<RpcOutcome>;
|
|
194
|
+
/** Is this operation a read (a GET/HEAD, a GraphQL query, or a POST the
|
|
195
|
+
* spec named like a search)? Drives readOnlyHint and the read-only surface. */
|
|
196
|
+
export declare function isReadOperation(op: {
|
|
197
|
+
httpMethod: string;
|
|
198
|
+
method?: string;
|
|
199
|
+
graphql?: {
|
|
200
|
+
kind: string;
|
|
201
|
+
};
|
|
202
|
+
}): boolean;
|
|
203
|
+
/** Tool annotations (spec: hints, untrusted by clients). Clients such as
|
|
204
|
+
* Claude Code use readOnlyHint to auto-approve reads and destructiveHint to
|
|
205
|
+
* confirm writes that overwrite or remove. The server talks to one known
|
|
206
|
+
* API, not the open world, so openWorldHint is false. */
|
|
207
|
+
export declare function annotationsFor(op: {
|
|
208
|
+
httpMethod: string;
|
|
209
|
+
summary?: string;
|
|
210
|
+
tool: string;
|
|
211
|
+
method?: string;
|
|
212
|
+
graphql?: {
|
|
213
|
+
kind: string;
|
|
214
|
+
};
|
|
215
|
+
safety?: "read" | "write" | "destructive";
|
|
216
|
+
}): ToolAnnotations;
|
|
217
|
+
/** One effect vocabulary for generated references, CLI confirmation, and
|
|
218
|
+
* MCP annotations. Stored on the operation manifest so every renderer says
|
|
219
|
+
* the same thing even when the original operation name was unusual. */
|
|
220
|
+
export declare function operationSafety(op: {
|
|
221
|
+
httpMethod: string;
|
|
222
|
+
method?: string;
|
|
223
|
+
graphql?: {
|
|
224
|
+
kind: string;
|
|
225
|
+
};
|
|
226
|
+
safety?: "read" | "write" | "destructive";
|
|
227
|
+
}): "read" | "write" | "destructive";
|
|
228
|
+
/** A deterministic, schema-valid-enough example for documentation and
|
|
229
|
+
* agent calls. Prefer facts supplied by the API author, then conservative
|
|
230
|
+
* values based on formats and field names. Only required object fields are
|
|
231
|
+
* included, keeping examples useful instead of manufacturing giant bodies. */
|
|
232
|
+
export declare function exampleFromSchema(schema: unknown, field?: string, depth?: number): unknown;
|
|
233
|
+
export declare function exampleArgumentsFromSchema(inputSchema: Record<string, unknown>): Record<string, unknown>;
|
|
234
|
+
/** The `fields` argument every tool takes unless the API already has one:
|
|
235
|
+
* dotted paths to keep in the result (per item for paginated tools). */
|
|
236
|
+
export declare const FIELDS_ARGUMENT = "fields";
|
|
237
|
+
/** The input schema a tool advertises: the operation's own arguments plus
|
|
238
|
+
* `select` (GraphQL selection override) and `fields` (result projection)
|
|
239
|
+
* when those names are free. */
|
|
240
|
+
export declare function toolInputSchema(op: OpLike): Record<string, unknown>;
|
|
241
|
+
/** True when the tool's own schema has a `fields` parameter, so the
|
|
242
|
+
* projection argument is the API's, not ours. */
|
|
243
|
+
export declare function hasOwnFieldsParam(op: OpLike): boolean;
|
|
244
|
+
/** One tool per operation, as advertised by tools/list. */
|
|
245
|
+
export declare function operationTool(op: OpLike): ToolDefinition;
|
|
246
|
+
/** Reference matches per search_docs page. */
|
|
247
|
+
export declare const SEARCH_PAGE_SIZE = 15;
|
|
248
|
+
export declare const SEARCH_DOCS_TOOL: ToolDefinition;
|
|
249
|
+
export declare const READ_DOCS_TOOL: ToolDefinition;
|
|
250
|
+
export declare const EXECUTE_TOOL: ToolDefinition;
|
|
251
|
+
/** Which operations a server exposes, beyond the streams rule. */
|
|
252
|
+
export interface SurfaceOptions {
|
|
253
|
+
/** Hide every operation that is not a read (isReadOperation). */
|
|
254
|
+
readOnly?: boolean;
|
|
255
|
+
/** Keep only these: resource names, tool names, or dotted resource.method. */
|
|
256
|
+
include?: string[];
|
|
257
|
+
/** Expose upload operations (the server runs where the files are). */
|
|
258
|
+
uploads?: boolean;
|
|
259
|
+
}
|
|
260
|
+
/** The operations a server serves under these options: the callable set,
|
|
261
|
+
* not just the listed one, so a hidden write is not reachable by name or
|
|
262
|
+
* through execute either. Deterministic (spec) order. */
|
|
263
|
+
export declare function visibleOps<T extends OpLike>(ops: T[], options?: SurfaceOptions): T[];
|
|
264
|
+
/** Parse a comma-separated include list (from an env var or a flag). */
|
|
265
|
+
export declare function parseIncludeList(value: string | undefined | null): string[] | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* The tool list for a mode: every operation plus the docs pair, or the
|
|
268
|
+
* three-tool "meta" shape (search_docs, read_docs, execute) that keeps huge
|
|
269
|
+
* APIs from flooding an agent's context. Deterministic order.
|
|
270
|
+
*/
|
|
271
|
+
export declare function toolDefinitions(ops: OpLike[], mode: "operations" | "meta"): ToolDefinition[];
|
|
272
|
+
/** How big a tools/list is, as agents pay for it. Characters of JSON and a
|
|
273
|
+
* rough token count (one token per four characters, the usual estimate for
|
|
274
|
+
* JSON). Generation and `<bin> mcp` report it. */
|
|
275
|
+
export declare function toolsListSize(tools: ToolDefinition[]): {
|
|
276
|
+
tools: number;
|
|
277
|
+
chars: number;
|
|
278
|
+
approxTokens: number;
|
|
279
|
+
};
|
|
280
|
+
/** Keep automatic per-operation discovery under roughly 10k tokens. The
|
|
281
|
+
* schema, not merely the operation count, determines what an agent pays. */
|
|
282
|
+
export declare const MCP_AUTO_MAX_TOOLS_LIST_CHARS = 40000;
|
|
283
|
+
export declare function resolveToolMode(ops: OpLike[], requested?: "operations" | "meta" | "auto"): {
|
|
284
|
+
mode: "operations" | "meta";
|
|
285
|
+
tools: number;
|
|
286
|
+
chars: number;
|
|
287
|
+
approxTokens: number;
|
|
288
|
+
};
|
|
289
|
+
/** Resolve an operation by tool name or dotted resource.method. */
|
|
290
|
+
export declare function findOperation(ops: OpLike[], wanted: string): OpLike | undefined;
|
|
291
|
+
/** Names of the arguments the caller must supply, given the op's params. */
|
|
292
|
+
export declare function missingArguments(op: OpLike, args: Record<string, unknown>): string[];
|
|
293
|
+
export interface InstructionsInput {
|
|
294
|
+
title: string;
|
|
295
|
+
/** Operations the server serves (after read-only / include filtering). */
|
|
296
|
+
toolCount: number;
|
|
297
|
+
mode: "operations" | "meta";
|
|
298
|
+
readOnly?: boolean;
|
|
299
|
+
/** Write operations hidden by read-only mode. */
|
|
300
|
+
hiddenWrites?: number;
|
|
301
|
+
/** One sentence on where credentials come from, for this transport. */
|
|
302
|
+
authHint?: string | null;
|
|
303
|
+
/** The tool that returns the caller (the CLI's whoami target), when the API has one. */
|
|
304
|
+
identityTool?: string | null;
|
|
305
|
+
/** Upload operations are exposed (local server): their file arguments take paths. */
|
|
306
|
+
uploads?: boolean;
|
|
307
|
+
/** Project-supplied text, appended verbatim. */
|
|
308
|
+
custom?: string | null;
|
|
309
|
+
}
|
|
310
|
+
/** The server/discover instructions: what the tools are, how arguments and
|
|
311
|
+
* results behave, where credentials come from, plus whatever the project
|
|
312
|
+
* adds. One paragraph; agents read it once per session. */
|
|
313
|
+
export declare function serverInstructions(input: InstructionsInput): string;
|
|
314
|
+
export interface ArgumentIssue {
|
|
315
|
+
code: "UNKNOWN_ARGUMENT" | "INVALID_ARGUMENT" | "MISSING_ARGUMENT";
|
|
316
|
+
argument: string;
|
|
317
|
+
message: string;
|
|
318
|
+
}
|
|
319
|
+
/** Everything a tool call needs after its arguments were checked: the
|
|
320
|
+
* arguments to send (coerced, projection stripped), and how to shape the
|
|
321
|
+
* result. */
|
|
322
|
+
export interface PreparedCall {
|
|
323
|
+
args: Record<string, unknown>;
|
|
324
|
+
/** Dotted paths from the `fields` argument, null for the whole result. */
|
|
325
|
+
fields: string[][] | null;
|
|
326
|
+
maxChars: number;
|
|
327
|
+
}
|
|
328
|
+
/** The closest accepted name: same letters ignoring case/punctuation first,
|
|
329
|
+
* then a small edit distance. Undefined when nothing is close. */
|
|
330
|
+
export declare function closestName(name: string, known: string[]): string | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* Coerce one value toward its schema when the intent is unambiguous: the
|
|
333
|
+
* strings agents produce for booleans and numbers, a JSON string for an
|
|
334
|
+
* object or array, a scalar for a one-element array, an enum member in the
|
|
335
|
+
* wrong case. Returns the value to send, or a message when it can't be made
|
|
336
|
+
* to fit. Untyped schemas (unions, anything) pass through.
|
|
337
|
+
*/
|
|
338
|
+
export declare function coerceValue(value: unknown, schema: Record<string, unknown>): {
|
|
339
|
+
value: unknown;
|
|
340
|
+
} | {
|
|
341
|
+
error: string;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Check a tool call's arguments against the tool's input schema before
|
|
345
|
+
* anything reaches the API. Unknown names are matched to the accepted one
|
|
346
|
+
* when only case or punctuation differs (accountId -> account_id) and
|
|
347
|
+
* rejected with a suggestion otherwise; values are coerced where the
|
|
348
|
+
* intent is clear and rejected where it isn't; required arguments must be
|
|
349
|
+
* present. Every problem is reported at once, as one isError result, so a
|
|
350
|
+
* single round trip fixes the call. Nothing is dropped silently.
|
|
351
|
+
*/
|
|
352
|
+
export declare function prepareCall(op: OpLike, rawArgs: Record<string, unknown>, options?: {
|
|
353
|
+
maxChars?: number;
|
|
354
|
+
}): {
|
|
355
|
+
ok: true;
|
|
356
|
+
call: PreparedCall;
|
|
357
|
+
} | {
|
|
358
|
+
ok: false;
|
|
359
|
+
outcome: ToolOutcome;
|
|
360
|
+
};
|
|
361
|
+
/** The isError result for bad arguments: one stable code, one issue per
|
|
362
|
+
* argument, and the way out. */
|
|
363
|
+
export declare function argumentsError(op: {
|
|
364
|
+
tool: string;
|
|
365
|
+
}, issues: ArgumentIssue[]): ToolOutcome;
|
|
366
|
+
/** Keep only `paths` of a value: arrays item by item, objects by dotted
|
|
367
|
+
* path; scalars untouched. Same rule as the CLI's --fields. */
|
|
368
|
+
export declare function projectFields(value: unknown, paths: string[][] | null): unknown;
|
|
369
|
+
/** How a result was shaped; every field optional so callers can pass what they have. */
|
|
370
|
+
export interface ResultOptions {
|
|
371
|
+
fields?: string[][] | null;
|
|
372
|
+
maxChars?: number;
|
|
373
|
+
/** For paginated results that must be cut: the op's pagination config and
|
|
374
|
+
* the call's arguments let some styles resume exactly where the cut fell. */
|
|
375
|
+
pagination?: OpLike["pagination"];
|
|
376
|
+
args?: Record<string, unknown>;
|
|
377
|
+
}
|
|
378
|
+
/** The result shape for a paginated tool: one page, a continuation signal,
|
|
379
|
+
* and the exact arguments that fetch the next page. Over the size cap, the
|
|
380
|
+
* page is cut to whole items with a `truncated` note; offset and
|
|
381
|
+
* last-id styles resume at the cut, cursor and page styles say what the
|
|
382
|
+
* caller must do instead. */
|
|
383
|
+
export declare function pageOutcome(items: unknown[], nextPage: Record<string, unknown> | null, options?: ResultOptions): ToolOutcome;
|
|
384
|
+
export declare function dataOutcome(data: unknown, options?: ResultOptions): ToolOutcome;
|
|
385
|
+
/** Images up to this many bytes come back as an image content block the
|
|
386
|
+
* model can look at; larger ones follow the binary path. */
|
|
387
|
+
export declare const MAX_IMAGE_BYTES = 4000000;
|
|
388
|
+
/** Without a place to save, a binary up to this size is embedded as a
|
|
389
|
+
* base64 resource block; beyond it, the result describes the file. */
|
|
390
|
+
export declare const MAX_EMBED_BYTES = 1000000;
|
|
391
|
+
export interface BinaryOptions {
|
|
392
|
+
/** Where a binary can be written when the server runs on the agent's
|
|
393
|
+
* machine: return the saved path. Absent on remote servers. */
|
|
394
|
+
saveBinary?: (bytes: Uint8Array, mediaType: string, suggestedName: string) => Promise<string> | string;
|
|
395
|
+
/** Tool name, for resource URIs and file names. */
|
|
396
|
+
tool?: string;
|
|
397
|
+
}
|
|
398
|
+
/** A file extension for a media type (bin when unknown). */
|
|
399
|
+
export declare function extensionFor(mediaType: string): string;
|
|
400
|
+
/**
|
|
401
|
+
* A binary response as the agent should get it: an image block for images
|
|
402
|
+
* the model can look at, a saved file (path, type, size) when the server
|
|
403
|
+
* can write one, an embedded resource for small binaries otherwise, and
|
|
404
|
+
* a description when it is too large to carry. Never "{}".
|
|
405
|
+
*/
|
|
406
|
+
export declare function binaryOutcome(blob: Blob, options?: BinaryOptions): Promise<ToolOutcome>;
|
|
407
|
+
/** Stable codes an agent can branch on (the same vocabulary as the
|
|
408
|
+
* generated CLI's error envelope). Additive only. */
|
|
409
|
+
export type ErrorCode = "NO_AUTH" | "AUTH_INVALID" | "PLAN_LIMIT" | "NOT_FOUND" | "INVALID_REQUEST" | "RATE_LIMITED" | "SERVER_ERROR" | "NETWORK_ERROR" | "VALIDATION_FAILED" | "INVALID_ARGUMENTS" | "CONFIRMATION_REQUIRED" | "NOT_AVAILABLE" | "CALL_FAILED";
|
|
410
|
+
export interface ErrorContext {
|
|
411
|
+
/** One sentence on how to supply a credential on this transport. */
|
|
412
|
+
authHint?: string | null;
|
|
413
|
+
/** The API's docs site, for docs_url. */
|
|
414
|
+
docsUrl?: string | null;
|
|
415
|
+
/** True when a credential was sent with the request (401 means it was rejected). */
|
|
416
|
+
hadCredential?: boolean;
|
|
417
|
+
}
|
|
418
|
+
/** Classify an SDK error result by status: the code and what to do next. */
|
|
419
|
+
export declare function classifyError(error: unknown, context?: ErrorContext): {
|
|
420
|
+
code: ErrorCode;
|
|
421
|
+
nextSteps: string[];
|
|
422
|
+
};
|
|
423
|
+
/** A typed API error as the agent should see it: name, a stable code, the
|
|
424
|
+
* message, status, the API's body, where to read more, and what to do. */
|
|
425
|
+
export declare function errorOutcome(error: unknown, context?: ErrorContext): ToolOutcome;
|
|
426
|
+
export declare function textError(text: string, code?: ErrorCode, nextSteps?: string[]): ToolOutcome;
|
|
427
|
+
export interface DocsSource {
|
|
428
|
+
ops: OpLike[];
|
|
429
|
+
/** Base URL of the docs site, or null when none is configured. */
|
|
430
|
+
docsUrl(): string | null;
|
|
431
|
+
/** Fetch a URL's text, or null on any failure. */
|
|
432
|
+
fetchText(url: string): Promise<string | null>;
|
|
433
|
+
}
|
|
434
|
+
export declare function referenceText(op: OpLike): string;
|
|
435
|
+
/** Relevance of one operation to the terms: the tool name counts most,
|
|
436
|
+
* then summary, path and argument names, then the description. The whole
|
|
437
|
+
* query as a phrase in the name or summary is a strong signal. */
|
|
438
|
+
export declare function searchScore(op: OpLike, query: string): number;
|
|
439
|
+
export declare function docsSearch(source: DocsSource, query: string, page?: number): Promise<ToolOutcome>;
|
|
440
|
+
export declare function docsRead(source: DocsSource, page: string): Promise<ToolOutcome>;
|
|
441
|
+
/**
|
|
442
|
+
* Dispatch for the shared tools (search_docs, read_docs, execute); returns
|
|
443
|
+
* undefined for anything else so the caller can run its own tools.
|
|
444
|
+
* `runOperation` is how an execute call reaches the API; `source.ops` is
|
|
445
|
+
* the callable set, so a hidden operation is unknown here too.
|
|
446
|
+
*/
|
|
447
|
+
export declare function callSharedTool(name: string, args: Record<string, unknown>, source: DocsSource, runOperation: (op: OpLike, args: Record<string, unknown>) => Promise<ToolOutcome>): Promise<ToolOutcome | undefined>;
|
|
448
|
+
/** A fetch for docs pages: markdown preferred, same-origin redirects only,
|
|
449
|
+
* a 10s deadline, and a 2 MB streaming cap. The caller already constrained
|
|
450
|
+
* the first URL to its configured docs origin; redirects must not escape it. */
|
|
451
|
+
export declare const MAX_DOCS_TEXT_BYTES = 2000000;
|
|
452
|
+
export declare function fetchDocsText(url: string): Promise<string | null>;
|
|
453
|
+
//# sourceMappingURL=mcp-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-protocol.d.ts","sourceRoot":"","sources":["../src/mcp-protocol.ts"],"names":[],"mappings":"AAAA;;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