Seu navegador
Verificando…
Para conectar um agente de verdade, use um Chrome recente e ative a flag "WebMCP for testing" em chrome://flags.
Agentes de IA
WebMCP é um novo padrão de navegador. Uma página web descreve o que sabe fazer na forma de ferramentas, cada uma com nome, descrição e um schema de entrada em JSON. Um agente de IA no navegador então usa o site por meio dessas ferramentas, em vez de adivinhar onde clicar.
Verificando…
Para conectar um agente de verdade, use um Chrome recente e ative a flag "WebMCP for testing" em chrome://flags.
A página declara ferramentas
Cada funcionalidade registra suas ferramentas no Angular. As ferramentas do Campo minado só existem enquanto o jogo está na tela.
O navegador as lista
O navegador mostra ao agente as ferramentas da página aberta: nomes, descrições e schemas de entrada.
O agente chama uma ferramenta
A ferramenta chama o mesmo serviço Angular que os botões, então a página se atualiza como se uma pessoa tivesse clicado.
Chame uma ferramenta como um agente faria. O jogo à direita está rodando, então as ferramentas dele também estão ativas nesta página.
Dificuldade
Todas as chamadas de ferramentas neste site, vindas de um agente de IA ou do playground. Expanda uma linha para ver o JSON.
Todas as ferramentas que este site pode expor e onde cada uma está disponível.
list_pages Ativa agora Somente leituraLists the pages of this website, the article ids, the supported languages and the page that is open now.
Sem entrada
navigate_to_page Ativa agora Opens a page of this website in the current language. For a specific article pass page "articles" and its article id.
{
"type": "object",
"properties": {
"page": {
"type": "string",
"enum": [
"home",
"games",
"minesweeper",
"chess",
"mill",
"abalone",
"articles",
"joker",
"webmcp",
"contact",
"links"
],
"description": "Page to open."
},
"article": {
"type": "string",
"enum": [
"resource-sandbox",
"birds",
"r2r-vs-ros2"
],
"description": "Optional article id, only with page \"articles\"."
}
},
"required": [
"page"
]
}set_language Ativa agora Switches the website language and keeps the current page open.
{
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": [
"pl",
"en",
"de",
"fr",
"es",
"it",
"pt",
"uk",
"no",
"sv",
"zh",
"ja",
"hi"
],
"description": "pl=Polish, en=English, de=German, fr=French, es=Spanish, it=Italian, pt=Portuguese (Brazil), uk=Ukrainian, no=Norwegian, sv=Swedish, zh=Chinese, ja=Japanese, hi=Hindi."
}
},
"required": [
"language"
]
}set_color_scheme Ativa agora Switches the website between the light and the dark color scheme.
{
"type": "object",
"properties": {
"scheme": {
"type": "string",
"enum": [
"light",
"dark"
]
}
},
"required": [
"scheme"
]
}set_seasonal_effect Ativa agora Sets the decorative animated overlay. "auto" picks one by date: snow in winter, butterflies in spring, halloween in October.
{
"type": "object",
"properties": {
"effect": {
"type": "string",
"enum": [
"auto",
"off",
"snow",
"butterflies",
"halloween"
]
}
},
"required": [
"effect"
]
}minesweeper_get_board Ativa agora Somente leituraReturns the visible board, the game status and the counters. Hidden cells never reveal whether they hold a mine.
Sem entrada
minesweeper_reveal_cell Ativa agora Reveals a hidden cell, like a left click. Revealing a mine loses the game. Returns the updated board.
{
"type": "object",
"properties": {
"row": {
"type": "integer",
"minimum": 0,
"maximum": 23,
"description": "0-based row, top to bottom."
},
"col": {
"type": "integer",
"minimum": 0,
"maximum": 29,
"description": "0-based column, left to right."
}
},
"required": [
"row",
"col"
]
}minesweeper_toggle_flag Ativa agora Toggles a flag on a hidden cell, like a right click. Returns the updated board.
{
"type": "object",
"properties": {
"row": {
"type": "integer",
"minimum": 0,
"maximum": 23,
"description": "0-based row, top to bottom."
},
"col": {
"type": "integer",
"minimum": 0,
"maximum": 29,
"description": "0-based column, left to right."
}
},
"required": [
"row",
"col"
]
}minesweeper_new_game Ativa agora Com efeitosDiscards the current game and starts a new one. Optionally switches the difficulty: beginner (9×9, 10 mines), intermediate (16×16, 40 mines), expert (16 rows × 30 columns, 99 mines) or custom (the last custom size).
{
"type": "object",
"properties": {
"difficulty": {
"type": "string",
"enum": [
"beginner",
"intermediate",
"expert",
"custom"
]
}
}
}ask_joke_botSaída não confiávelSends a message to the AI joke bot on this page. The message and the answer appear in the chat. Returns the joke.
{
"type": "object",
"properties": {
"topic": {
"type": "string",
"description": "Topic or message for the joke bot."
}
},
"required": [
"topic"
]
}As ferramentas são constantes simples que chamam serviços Angular. O registro as vincula ao ciclo de vida do app ou de um componente.
Defina uma ferramenta
export const SET_COLOR_SCHEME = defineWebMcpTool({
name: 'set_color_scheme',
description: 'Switches the website between the light and the dark color scheme.',
inputSchema: {
type: 'object',
properties: { scheme: { type: 'string', enum: ['light', 'dark'] } },
required: ['scheme'],
},
execute: (input) => {
inject(ColorSchemeService).setScheme(input.scheme);
return `Color scheme set to ${input.scheme}.`;
},
});Registre ferramentas para todas as páginas
export const appConfig: ApplicationConfig = {
providers: [
provideWebMcpTools('site', SITE_WEBMCP_TOOLS),
],
};Registre ferramentas para um componente
export class MinesweeperComponent {
constructor() {
declareWebMcpTools('minesweeper', MINESWEEPER_WEBMCP_TOOLS);
}
}Experimente no console do DevTools
const tools = await document.modelContext.getTools();
tools.map((tool) => tool.name);
const reveal = tools.find((tool) => tool.name === 'minesweeper_reveal_cell');
await document.modelContext.executeTool(reveal, { row: 4, col: 4 });