Skip to content

Commit ace9162

Browse files
committed
refactor: Move mcp directory out of adk and place it in samples/agent as a sibling.
The intent is that `mcp` will house further MCP-related examples, and by separating it out from the `adk` directory, we want to refine the `adk` directory to be where the Agents are defined. Since MCP is still a Agent-specific resource, we will place it within the `samples/agent` directory.
1 parent caf0e28 commit ace9162

13 files changed

Lines changed: 2749 additions & 0 deletions

File tree

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
{
2+
"title": "A2UI Message Schema",
3+
"description": "Describes a JSON payload for an A2UI (Agent to UI) message, which is used to dynamically construct and update user interfaces. A message MUST contain exactly ONE of the action properties: 'beginRendering', 'surfaceUpdate', 'dataModelUpdate', or 'deleteSurface'.",
4+
"type": "object",
5+
"additionalProperties": false,
6+
"properties": {
7+
"beginRendering": {
8+
"type": "object",
9+
"description": "Signals the client to begin rendering a surface with a root component and specific styles.",
10+
"additionalProperties": false,
11+
"properties": {
12+
"surfaceId": {
13+
"type": "string",
14+
"description": "The unique identifier for the UI surface to be rendered."
15+
},
16+
"catalogId": {
17+
"type": "string",
18+
"description": "The identifier of the component catalog to use for this surface. If omitted, the client MUST default to the standard catalog for this A2UI version (https://a2ui.org/specification/v0_8/standard_catalog_definition.json)."
19+
},
20+
"root": {
21+
"type": "string",
22+
"description": "The ID of the root component to render."
23+
},
24+
"styles": {
25+
"type": "object",
26+
"description": "Styling information for the UI.",
27+
"additionalProperties": true
28+
}
29+
},
30+
"required": ["root", "surfaceId"]
31+
},
32+
"surfaceUpdate": {
33+
"type": "object",
34+
"description": "Updates a surface with a new set of components.",
35+
"additionalProperties": false,
36+
"properties": {
37+
"surfaceId": {
38+
"type": "string",
39+
"description": "The unique identifier for the UI surface to be updated. If you are adding a new surface this *must* be a new, unique identified that has never been used for any existing surfaces shown."
40+
},
41+
"components": {
42+
"type": "array",
43+
"description": "A list containing all UI components for the surface.",
44+
"minItems": 1,
45+
"items": {
46+
"type": "object",
47+
"description": "Represents a *single* component in a UI widget tree. This component could be one of many supported types.",
48+
"additionalProperties": false,
49+
"properties": {
50+
"id": {
51+
"type": "string",
52+
"description": "The unique identifier for this component."
53+
},
54+
"weight": {
55+
"type": "number",
56+
"description": "The relative weight of this component within a Row or Column. This corresponds to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column."
57+
},
58+
"component": {
59+
"type": "object",
60+
"description": "A wrapper object that MUST contain exactly one key, which is the name of the component type. The value is an object containing the properties for that specific component.",
61+
"additionalProperties": true
62+
}
63+
},
64+
"required": ["id", "component"]
65+
}
66+
}
67+
},
68+
"required": ["surfaceId", "components"]
69+
},
70+
"dataModelUpdate": {
71+
"type": "object",
72+
"description": "Updates the data model for a surface.",
73+
"additionalProperties": false,
74+
"properties": {
75+
"surfaceId": {
76+
"type": "string",
77+
"description": "The unique identifier for the UI surface this data model update applies to."
78+
},
79+
"path": {
80+
"type": "string",
81+
"description": "An optional path to a location within the data model (e.g., '/user/name'). If omitted, or set to '/', the entire data model will be replaced."
82+
},
83+
"contents": {
84+
"type": "array",
85+
"description": "An array of data entries. Each entry must contain a 'key' and exactly one corresponding typed 'value*' property.",
86+
"items": {
87+
"type": "object",
88+
"description": "A single data entry. Exactly one 'value*' property should be provided alongside the key.",
89+
"additionalProperties": false,
90+
"properties": {
91+
"key": {
92+
"type": "string",
93+
"description": "The key for this data entry."
94+
},
95+
"valueString": {
96+
"type": "string"
97+
},
98+
"valueNumber": {
99+
"type": "number"
100+
},
101+
"valueBoolean": {
102+
"type": "boolean"
103+
},
104+
"valueMap": {
105+
"description": "Represents a map as an adjacency list.",
106+
"type": "array",
107+
"items": {
108+
"type": "object",
109+
"description": "One entry in the map. Exactly one 'value*' property should be provided alongside the key.",
110+
"additionalProperties": false,
111+
"properties": {
112+
"key": {
113+
"type": "string"
114+
},
115+
"valueString": {
116+
"type": "string"
117+
},
118+
"valueNumber": {
119+
"type": "number"
120+
},
121+
"valueBoolean": {
122+
"type": "boolean"
123+
}
124+
},
125+
"required": ["key"]
126+
}
127+
}
128+
},
129+
"required": ["key"]
130+
}
131+
}
132+
},
133+
"required": ["contents", "surfaceId"]
134+
},
135+
"deleteSurface": {
136+
"type": "object",
137+
"description": "Signals the client to delete the surface identified by 'surfaceId'.",
138+
"additionalProperties": false,
139+
"properties": {
140+
"surfaceId": {
141+
"type": "string",
142+
"description": "The unique identifier for the UI surface to be deleted."
143+
}
144+
},
145+
"required": ["surfaceId"]
146+
}
147+
}
148+
}

0 commit comments

Comments
 (0)