@agentmanifest/mcp-server 0.1.4 → 0.1.5
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/README.md +19 -7
- package/assets/icon.svg +10 -0
- package/dist/amp-mcp.mcpb +0 -0
- package/dist/create-server.d.ts.map +1 -1
- package/dist/create-server.js +61 -10
- package/dist/create-server.js.map +1 -1
- package/dist/lib/__tests__/submit-listing.test.d.ts +2 -0
- package/dist/lib/__tests__/submit-listing.test.d.ts.map +1 -0
- package/dist/lib/__tests__/submit-listing.test.js +46 -0
- package/dist/lib/__tests__/submit-listing.test.js.map +1 -0
- package/dist/lib/submit-listing.d.ts +21 -0
- package/dist/lib/submit-listing.d.ts.map +1 -0
- package/dist/lib/submit-listing.js +92 -0
- package/dist/lib/submit-listing.js.map +1 -0
- package/dist/tool-catalog.d.ts +459 -0
- package/dist/tool-catalog.d.ts.map +1 -0
- package/dist/tool-catalog.js +280 -0
- package/dist/tool-catalog.js.map +1 -0
- package/package.json +7 -2
- package/schemas/smithery-config.schema.json +20 -0
- package/schemas/smithery-tool-catalog.json +223 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export const manifestObjectSchema = z
|
|
3
|
+
.record(z.unknown())
|
|
4
|
+
.describe('Parsed AMP manifest object (agentmanifest-0.2 or agentmanifest-0.3).');
|
|
5
|
+
export const fetchManifestOutputSchema = z.object({
|
|
6
|
+
domain: z.string(),
|
|
7
|
+
origin: z.string(),
|
|
8
|
+
manifest_url: z.string(),
|
|
9
|
+
tried_urls: z.array(z.string()),
|
|
10
|
+
manifest: manifestObjectSchema,
|
|
11
|
+
});
|
|
12
|
+
export const validateSyntaxOutputSchema = z.object({
|
|
13
|
+
valid: z.boolean(),
|
|
14
|
+
spec_version: z.string().nullable(),
|
|
15
|
+
schema_checked: z.string().nullable(),
|
|
16
|
+
errors: z.array(z.string()),
|
|
17
|
+
success_token: z.string().nullable(),
|
|
18
|
+
});
|
|
19
|
+
export const submitListingOutputSchema = z.object({
|
|
20
|
+
submission_id: z.string(),
|
|
21
|
+
status: z.string(),
|
|
22
|
+
status_url: z.string(),
|
|
23
|
+
status_poll_url: z.string(),
|
|
24
|
+
message: z.string(),
|
|
25
|
+
});
|
|
26
|
+
export const submissionStatusOutputSchema = z.object({
|
|
27
|
+
submission_id: z.string(),
|
|
28
|
+
url: z.string(),
|
|
29
|
+
status: z.string(),
|
|
30
|
+
created_at: z.string().optional(),
|
|
31
|
+
listing_id: z.string().optional(),
|
|
32
|
+
listing_url: z.string().optional(),
|
|
33
|
+
error: z.string().optional(),
|
|
34
|
+
message: z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
export const checkPermissionsOutputSchema = z.object({
|
|
37
|
+
verdict: z.enum(['compliant', 'violation', 'warning', 'unknown']),
|
|
38
|
+
compliant: z.boolean(),
|
|
39
|
+
action: z.object({
|
|
40
|
+
raw: z.string(),
|
|
41
|
+
method: z.string().nullable(),
|
|
42
|
+
path: z.string().nullable(),
|
|
43
|
+
}),
|
|
44
|
+
findings: z.array(z.object({
|
|
45
|
+
code: z.string(),
|
|
46
|
+
severity: z.enum(['error', 'warning', 'info']),
|
|
47
|
+
message: z.string(),
|
|
48
|
+
})),
|
|
49
|
+
matched_endpoint: z
|
|
50
|
+
.object({
|
|
51
|
+
path: z.string(),
|
|
52
|
+
method: z.string(),
|
|
53
|
+
})
|
|
54
|
+
.nullable(),
|
|
55
|
+
});
|
|
56
|
+
/** JSON Schema fragments for Smithery serverCard (deploy payload). */
|
|
57
|
+
export const SMITHERY_TOOL_CARDS = [
|
|
58
|
+
{
|
|
59
|
+
name: 'fetch_manifest_by_domain',
|
|
60
|
+
title: 'Fetch AMP manifest by domain',
|
|
61
|
+
description: 'Resolve an API origin from a domain (e.g. "bakebase.agent-manifest.com"), try standard AMP discovery URLs, and return parsed manifest JSON plus metadata.',
|
|
62
|
+
annotations: {
|
|
63
|
+
title: 'Fetch AMP manifest by domain',
|
|
64
|
+
readOnlyHint: true,
|
|
65
|
+
destructiveHint: false,
|
|
66
|
+
idempotentHint: true,
|
|
67
|
+
openWorldHint: true,
|
|
68
|
+
},
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
domain: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
minLength: 1,
|
|
75
|
+
description: 'API hostname or URL origin without a path, e.g. "example.com" or "https://bakebase.agent-manifest.com".',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
required: ['domain'],
|
|
79
|
+
additionalProperties: false,
|
|
80
|
+
},
|
|
81
|
+
outputSchema: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
properties: {
|
|
84
|
+
domain: { type: 'string' },
|
|
85
|
+
origin: { type: 'string' },
|
|
86
|
+
manifest_url: { type: 'string' },
|
|
87
|
+
tried_urls: { type: 'array', items: { type: 'string' } },
|
|
88
|
+
manifest: { type: 'object', additionalProperties: true },
|
|
89
|
+
},
|
|
90
|
+
required: ['domain', 'origin', 'manifest_url', 'tried_urls', 'manifest'],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'validate_manifest_syntax',
|
|
95
|
+
title: 'Validate AMP manifest JSON Schema',
|
|
96
|
+
description: 'Validate a manifest JSON string or object against the official AMP JSON Schema for its spec_version (agentmanifest-0.2 or agentmanifest-0.3). Returns errors or a success_token.',
|
|
97
|
+
annotations: {
|
|
98
|
+
title: 'Validate AMP manifest JSON Schema',
|
|
99
|
+
readOnlyHint: true,
|
|
100
|
+
destructiveHint: false,
|
|
101
|
+
idempotentHint: true,
|
|
102
|
+
openWorldHint: false,
|
|
103
|
+
},
|
|
104
|
+
inputSchema: {
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: {
|
|
107
|
+
manifest: {
|
|
108
|
+
description: 'Either a JSON string of the manifest, or a parsed manifest object with spec_version, name, endpoints, etc.',
|
|
109
|
+
oneOf: [{ type: 'string' }, { type: 'object', additionalProperties: true }],
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
required: ['manifest'],
|
|
113
|
+
additionalProperties: false,
|
|
114
|
+
},
|
|
115
|
+
outputSchema: {
|
|
116
|
+
type: 'object',
|
|
117
|
+
properties: {
|
|
118
|
+
valid: { type: 'boolean' },
|
|
119
|
+
spec_version: { type: ['string', 'null'] },
|
|
120
|
+
schema_checked: { type: ['string', 'null'] },
|
|
121
|
+
errors: { type: 'array', items: { type: 'string' } },
|
|
122
|
+
success_token: { type: ['string', 'null'] },
|
|
123
|
+
},
|
|
124
|
+
required: ['valid', 'spec_version', 'schema_checked', 'errors', 'success_token'],
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'check_agent_permissions',
|
|
129
|
+
title: 'Check action against AMP manifest constraints',
|
|
130
|
+
description: 'Given an intended HTTP action (method + path or full URL) and a manifest, determine whether the action aligns with declared endpoints, authentication, payment onboarding, rate limits, and language in agent_notes.',
|
|
131
|
+
annotations: {
|
|
132
|
+
title: 'Check action against AMP manifest constraints',
|
|
133
|
+
readOnlyHint: true,
|
|
134
|
+
destructiveHint: false,
|
|
135
|
+
idempotentHint: true,
|
|
136
|
+
openWorldHint: false,
|
|
137
|
+
},
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: {
|
|
141
|
+
action: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
minLength: 1,
|
|
144
|
+
description: 'Intended operation, e.g. "POST /baking/validate-mix" or "GET https://api.example.com/v1/search".',
|
|
145
|
+
},
|
|
146
|
+
manifest: {
|
|
147
|
+
type: 'object',
|
|
148
|
+
additionalProperties: true,
|
|
149
|
+
description: 'Full AMP manifest object (from fetch_manifest_by_domain) with spec_version, endpoints, authentication, pricing, and agent_notes.',
|
|
150
|
+
},
|
|
151
|
+
intends_unauthenticated: {
|
|
152
|
+
type: 'boolean',
|
|
153
|
+
description: 'Set true if the agent plans to call the API without credentials.',
|
|
154
|
+
},
|
|
155
|
+
payment_onboarded: {
|
|
156
|
+
type: 'boolean',
|
|
157
|
+
description: 'Set true if AMP payment onboarding is already complete for this API.',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
required: ['action', 'manifest'],
|
|
161
|
+
additionalProperties: false,
|
|
162
|
+
},
|
|
163
|
+
outputSchema: {
|
|
164
|
+
type: 'object',
|
|
165
|
+
properties: {
|
|
166
|
+
verdict: { type: 'string', enum: ['compliant', 'violation', 'warning', 'unknown'] },
|
|
167
|
+
compliant: { type: 'boolean' },
|
|
168
|
+
action: {
|
|
169
|
+
type: 'object',
|
|
170
|
+
properties: {
|
|
171
|
+
raw: { type: 'string' },
|
|
172
|
+
method: { type: ['string', 'null'] },
|
|
173
|
+
path: { type: ['string', 'null'] },
|
|
174
|
+
},
|
|
175
|
+
required: ['raw', 'method', 'path'],
|
|
176
|
+
},
|
|
177
|
+
findings: {
|
|
178
|
+
type: 'array',
|
|
179
|
+
items: {
|
|
180
|
+
type: 'object',
|
|
181
|
+
properties: {
|
|
182
|
+
code: { type: 'string' },
|
|
183
|
+
severity: { type: 'string', enum: ['error', 'warning', 'info'] },
|
|
184
|
+
message: { type: 'string' },
|
|
185
|
+
},
|
|
186
|
+
required: ['code', 'severity', 'message'],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
matched_endpoint: {
|
|
190
|
+
oneOf: [
|
|
191
|
+
{
|
|
192
|
+
type: 'object',
|
|
193
|
+
properties: {
|
|
194
|
+
path: { type: 'string' },
|
|
195
|
+
method: { type: 'string' },
|
|
196
|
+
},
|
|
197
|
+
required: ['path', 'method'],
|
|
198
|
+
},
|
|
199
|
+
{ type: 'null' },
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
required: ['verdict', 'compliant', 'action', 'findings', 'matched_endpoint'],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'submit_api_to_amp_registry',
|
|
208
|
+
title: 'Submit API to AMP registry',
|
|
209
|
+
description: 'Submit an HTTPS API origin for AMP registry listing after the manifest is live at /.well-known/agent-manifest.json. Returns a submission_id; poll with check_amp_submission_status.',
|
|
210
|
+
annotations: {
|
|
211
|
+
title: 'Submit API to AMP registry',
|
|
212
|
+
readOnlyHint: false,
|
|
213
|
+
destructiveHint: false,
|
|
214
|
+
idempotentHint: false,
|
|
215
|
+
openWorldHint: true,
|
|
216
|
+
},
|
|
217
|
+
inputSchema: {
|
|
218
|
+
type: 'object',
|
|
219
|
+
properties: {
|
|
220
|
+
api_url: {
|
|
221
|
+
type: 'string',
|
|
222
|
+
minLength: 1,
|
|
223
|
+
description: 'HTTPS API origin where the manifest is hosted, e.g. "https://api.example.com" or "bakebase.agent-manifest.com".',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
required: ['api_url'],
|
|
227
|
+
additionalProperties: false,
|
|
228
|
+
},
|
|
229
|
+
outputSchema: {
|
|
230
|
+
type: 'object',
|
|
231
|
+
properties: {
|
|
232
|
+
submission_id: { type: 'string' },
|
|
233
|
+
status: { type: 'string' },
|
|
234
|
+
status_url: { type: 'string' },
|
|
235
|
+
status_poll_url: { type: 'string' },
|
|
236
|
+
message: { type: 'string' },
|
|
237
|
+
},
|
|
238
|
+
required: ['submission_id', 'status', 'status_url', 'status_poll_url', 'message'],
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'check_amp_submission_status',
|
|
243
|
+
title: 'Check AMP registry submission status',
|
|
244
|
+
description: 'Poll validation/listing progress for a submission_id returned by submit_api_to_amp_registry.',
|
|
245
|
+
annotations: {
|
|
246
|
+
title: 'Check AMP registry submission status',
|
|
247
|
+
readOnlyHint: true,
|
|
248
|
+
destructiveHint: false,
|
|
249
|
+
idempotentHint: true,
|
|
250
|
+
openWorldHint: true,
|
|
251
|
+
},
|
|
252
|
+
inputSchema: {
|
|
253
|
+
type: 'object',
|
|
254
|
+
properties: {
|
|
255
|
+
submission_id: {
|
|
256
|
+
type: 'string',
|
|
257
|
+
minLength: 1,
|
|
258
|
+
description: 'Submission id from submit_api_to_amp_registry (e.g. sub_1730000000_abc123).',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
required: ['submission_id'],
|
|
262
|
+
additionalProperties: false,
|
|
263
|
+
},
|
|
264
|
+
outputSchema: {
|
|
265
|
+
type: 'object',
|
|
266
|
+
properties: {
|
|
267
|
+
submission_id: { type: 'string' },
|
|
268
|
+
url: { type: 'string' },
|
|
269
|
+
status: { type: 'string' },
|
|
270
|
+
created_at: { type: 'string' },
|
|
271
|
+
listing_id: { type: 'string' },
|
|
272
|
+
listing_url: { type: 'string' },
|
|
273
|
+
error: { type: 'string' },
|
|
274
|
+
message: { type: 'string' },
|
|
275
|
+
},
|
|
276
|
+
required: ['submission_id', 'url', 'status'],
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
];
|
|
280
|
+
//# sourceMappingURL=tool-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../src/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;KACnB,QAAQ,CAAC,sEAAsE,CAAC,CAAC;AAEpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,oBAAoB;CAC/B,CAAC,CAAC;AAEH,MAAM,CAAC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d,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,6EAA6E;iBAC3F;aACF;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;YAC3B,oBAAoB,EAAE,KAAK;SAC5B;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACjC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACvB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC1B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC5B;YACD,QAAQ,EAAE,CAAC,eAAe,EAAE,KAAK,EAAE,QAAQ,CAAC;SAC7C;KACF;CACO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentmanifest/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"mcpName": "com.agent-manifest/amp-mcp",
|
|
5
5
|
"description": "Official MCP server for the Agent Manifest Protocol (AMP) — discover, validate, and check agent permissions against agent-manifest.json",
|
|
6
6
|
"type": "module",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"bin",
|
|
14
14
|
"dist",
|
|
15
15
|
"schemas",
|
|
16
|
+
"assets",
|
|
16
17
|
"smithery.yaml",
|
|
17
18
|
"README.md"
|
|
18
19
|
],
|
|
@@ -23,7 +24,11 @@
|
|
|
23
24
|
"start": "node dist/http.js",
|
|
24
25
|
"start:stdio": "node dist/index.js",
|
|
25
26
|
"test": "vitest run",
|
|
26
|
-
"prepublishOnly": "npm run build"
|
|
27
|
+
"prepublishOnly": "npm run build",
|
|
28
|
+
"registry:publish": "bash scripts/publish-registry.sh",
|
|
29
|
+
"smithery:bundle": "npm run build && npx -y mcp-bundler bundle --inspect && npx -y @anthropic-ai/mcpb pack .smithery/mcpb dist/amp-mcp.mcpb",
|
|
30
|
+
"smithery:publish": "bash scripts/publish-smithery.sh",
|
|
31
|
+
"smoke:mcp": "npm run build && node scripts/smoke-test-mcp.mjs"
|
|
27
32
|
},
|
|
28
33
|
"keywords": [
|
|
29
34
|
"mcp",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"description": "Optional tuning for AMP MCP (all fields optional).",
|
|
4
|
+
"properties": {
|
|
5
|
+
"AMP_FETCH_TIMEOUT_MS": {
|
|
6
|
+
"type": "integer",
|
|
7
|
+
"minimum": 1000,
|
|
8
|
+
"maximum": 120000,
|
|
9
|
+
"default": 15000,
|
|
10
|
+
"description": "Timeout in milliseconds when fetching manifests over HTTP."
|
|
11
|
+
},
|
|
12
|
+
"AMP_VALIDATOR_URL": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "uri",
|
|
15
|
+
"default": "https://validator.agent-manifest.com",
|
|
16
|
+
"description": "Base URL for the public AMP validator (used for optional remote checks)."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "fetch_manifest_by_domain",
|
|
4
|
+
"title": "Fetch AMP manifest by domain",
|
|
5
|
+
"description": "Resolve an API origin from a domain (e.g. \"bakebase.agent-manifest.com\"), try standard AMP discovery URLs, and return parsed manifest JSON plus metadata.",
|
|
6
|
+
"annotations": {
|
|
7
|
+
"title": "Fetch AMP manifest by domain",
|
|
8
|
+
"readOnlyHint": true,
|
|
9
|
+
"destructiveHint": false,
|
|
10
|
+
"idempotentHint": true,
|
|
11
|
+
"openWorldHint": true
|
|
12
|
+
},
|
|
13
|
+
"inputSchema": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"domain": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1,
|
|
19
|
+
"description": "API hostname or URL origin without a path, e.g. \"example.com\" or \"https://bakebase.agent-manifest.com\"."
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": ["domain"],
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
},
|
|
25
|
+
"outputSchema": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"domain": { "type": "string" },
|
|
29
|
+
"origin": { "type": "string" },
|
|
30
|
+
"manifest_url": { "type": "string" },
|
|
31
|
+
"tried_urls": { "type": "array", "items": { "type": "string" } },
|
|
32
|
+
"manifest": { "type": "object", "additionalProperties": true }
|
|
33
|
+
},
|
|
34
|
+
"required": ["domain", "origin", "manifest_url", "tried_urls", "manifest"]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "validate_manifest_syntax",
|
|
39
|
+
"title": "Validate AMP manifest JSON Schema",
|
|
40
|
+
"description": "Validate a manifest JSON string or object against the official AMP JSON Schema for its spec_version (agentmanifest-0.2 or agentmanifest-0.3). Returns errors or a success_token.",
|
|
41
|
+
"annotations": {
|
|
42
|
+
"title": "Validate AMP manifest JSON Schema",
|
|
43
|
+
"readOnlyHint": true,
|
|
44
|
+
"destructiveHint": false,
|
|
45
|
+
"idempotentHint": true,
|
|
46
|
+
"openWorldHint": false
|
|
47
|
+
},
|
|
48
|
+
"inputSchema": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"manifest": {
|
|
52
|
+
"description": "Either a JSON string of the manifest, or a parsed manifest object with spec_version, name, endpoints, etc.",
|
|
53
|
+
"oneOf": [{ "type": "string" }, { "type": "object", "additionalProperties": true }]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": ["manifest"],
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
},
|
|
59
|
+
"outputSchema": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"valid": { "type": "boolean" },
|
|
63
|
+
"spec_version": { "type": ["string", "null"] },
|
|
64
|
+
"schema_checked": { "type": ["string", "null"] },
|
|
65
|
+
"errors": { "type": "array", "items": { "type": "string" } },
|
|
66
|
+
"success_token": { "type": ["string", "null"] }
|
|
67
|
+
},
|
|
68
|
+
"required": ["valid", "spec_version", "schema_checked", "errors", "success_token"]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "check_agent_permissions",
|
|
73
|
+
"title": "Check action against AMP manifest constraints",
|
|
74
|
+
"description": "Given an intended HTTP action (method + path or full URL) and a manifest, determine whether the action aligns with declared endpoints, authentication, payment onboarding, rate limits, and language in agent_notes.",
|
|
75
|
+
"annotations": {
|
|
76
|
+
"title": "Check action against AMP manifest constraints",
|
|
77
|
+
"readOnlyHint": true,
|
|
78
|
+
"destructiveHint": false,
|
|
79
|
+
"idempotentHint": true,
|
|
80
|
+
"openWorldHint": false
|
|
81
|
+
},
|
|
82
|
+
"inputSchema": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"properties": {
|
|
85
|
+
"action": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"description": "Intended operation, e.g. \"POST /baking/validate-mix\" or \"GET https://api.example.com/v1/search\"."
|
|
89
|
+
},
|
|
90
|
+
"manifest": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": true,
|
|
93
|
+
"description": "Full AMP manifest object (from fetch_manifest_by_domain) with spec_version, endpoints, authentication, pricing, and agent_notes."
|
|
94
|
+
},
|
|
95
|
+
"intends_unauthenticated": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"description": "Set true if the agent plans to call the API without credentials."
|
|
98
|
+
},
|
|
99
|
+
"payment_onboarded": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"description": "Set true if AMP payment onboarding is already complete for this API."
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": ["action", "manifest"],
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
},
|
|
107
|
+
"outputSchema": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"properties": {
|
|
110
|
+
"verdict": { "type": "string", "enum": ["compliant", "violation", "warning", "unknown"] },
|
|
111
|
+
"compliant": { "type": "boolean" },
|
|
112
|
+
"action": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"raw": { "type": "string" },
|
|
116
|
+
"method": { "type": ["string", "null"] },
|
|
117
|
+
"path": { "type": ["string", "null"] }
|
|
118
|
+
},
|
|
119
|
+
"required": ["raw", "method", "path"]
|
|
120
|
+
},
|
|
121
|
+
"findings": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"code": { "type": "string" },
|
|
127
|
+
"severity": { "type": "string", "enum": ["error", "warning", "info"] },
|
|
128
|
+
"message": { "type": "string" }
|
|
129
|
+
},
|
|
130
|
+
"required": ["code", "severity", "message"]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"matched_endpoint": {
|
|
134
|
+
"oneOf": [
|
|
135
|
+
{
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"path": { "type": "string" },
|
|
139
|
+
"method": { "type": "string" }
|
|
140
|
+
},
|
|
141
|
+
"required": ["path", "method"]
|
|
142
|
+
},
|
|
143
|
+
{ "type": "null" }
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": ["verdict", "compliant", "action", "findings", "matched_endpoint"]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "submit_api_to_amp_registry",
|
|
152
|
+
"title": "Submit API to AMP registry",
|
|
153
|
+
"description": "Submit an HTTPS API origin for AMP registry listing after the manifest is live at /.well-known/agent-manifest.json. Returns a submission_id; poll with check_amp_submission_status.",
|
|
154
|
+
"annotations": {
|
|
155
|
+
"title": "Submit API to AMP registry",
|
|
156
|
+
"readOnlyHint": false,
|
|
157
|
+
"destructiveHint": false,
|
|
158
|
+
"idempotentHint": false,
|
|
159
|
+
"openWorldHint": true
|
|
160
|
+
},
|
|
161
|
+
"inputSchema": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"api_url": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"minLength": 1,
|
|
167
|
+
"description": "HTTPS API origin where the manifest is hosted, e.g. \"https://api.example.com\" or \"bakebase.agent-manifest.com\"."
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": ["api_url"],
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
},
|
|
173
|
+
"outputSchema": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"submission_id": { "type": "string" },
|
|
177
|
+
"status": { "type": "string" },
|
|
178
|
+
"status_url": { "type": "string" },
|
|
179
|
+
"status_poll_url": { "type": "string" },
|
|
180
|
+
"message": { "type": "string" }
|
|
181
|
+
},
|
|
182
|
+
"required": ["submission_id", "status", "status_url", "status_poll_url", "message"]
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "check_amp_submission_status",
|
|
187
|
+
"title": "Check AMP registry submission status",
|
|
188
|
+
"description": "Poll validation/listing progress for a submission_id returned by submit_api_to_amp_registry.",
|
|
189
|
+
"annotations": {
|
|
190
|
+
"title": "Check AMP registry submission status",
|
|
191
|
+
"readOnlyHint": true,
|
|
192
|
+
"destructiveHint": false,
|
|
193
|
+
"idempotentHint": true,
|
|
194
|
+
"openWorldHint": true
|
|
195
|
+
},
|
|
196
|
+
"inputSchema": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"properties": {
|
|
199
|
+
"submission_id": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"minLength": 1,
|
|
202
|
+
"description": "Submission id from submit_api_to_amp_registry (e.g. sub_1730000000_abc123)."
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": ["submission_id"],
|
|
206
|
+
"additionalProperties": false
|
|
207
|
+
},
|
|
208
|
+
"outputSchema": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"properties": {
|
|
211
|
+
"submission_id": { "type": "string" },
|
|
212
|
+
"url": { "type": "string" },
|
|
213
|
+
"status": { "type": "string" },
|
|
214
|
+
"created_at": { "type": "string" },
|
|
215
|
+
"listing_id": { "type": "string" },
|
|
216
|
+
"listing_url": { "type": "string" },
|
|
217
|
+
"error": { "type": "string" },
|
|
218
|
+
"message": { "type": "string" }
|
|
219
|
+
},
|
|
220
|
+
"required": ["submission_id", "url", "status"]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]
|