Tomasz Czajka

KI-Agenten

WebMCP: Diese Website spricht mit KI-Agenten

WebMCP ist ein neuer Browser-Standard. Eine Webseite beschreibt ihre Fähigkeiten als Werkzeuge, jeweils mit Namen, Beschreibung und JSON-Eingabeschema. Ein KI-Agent im Browser nutzt die Seite über diese Werkzeuge, statt zu raten, wohin er klicken soll.

Dein Browser

Wird geprüft…

Um einen echten Agenten zu verbinden, nutze ein aktuelles Chrome und aktiviere das Flag „WebMCP for testing“ unter chrome://flags.

So funktioniert es

  1. 1

    Die Seite deklariert Werkzeuge

    Jede Funktion registriert ihre Werkzeuge in Angular. Die Minesweeper-Werkzeuge gibt es nur, solange das Spiel sichtbar ist.

  2. 2

    Der Browser listet sie auf

    Der Browser zeigt dem Agenten die Werkzeuge der offenen Seite: Namen, Beschreibungen und Eingabeschemata.

  3. 3

    Der Agent ruft ein Werkzeug auf

    Das Werkzeug ruft denselben Angular-Service auf wie die Buttons, also reagiert die Seite wie auf einen echten Klick.

Playground

Rufe ein Werkzeug so auf wie ein Agent. Das Spiel rechts läuft live, daher sind seine Werkzeuge auch auf dieser Seite aktiv.

Minesweeper

Schwierigkeit

Verbleibende Bomben 10
Gesetzte Flaggen 0
Punktzahl 0
Fortschritt 0 / 71
Linksklick deckt ein Feld auf. Rechtsklick setzt eine Flagge.

Aktivitätsprotokoll

Jeder Werkzeugaufruf auf dieser Website, von einem KI-Agenten oder aus dem Playground. Zeile aufklappen, um das JSON zu sehen.

  • Noch keine Aufrufe. Führe ein Werkzeug im Playground aus oder lass einen Agenten spielen.

Werkzeugkatalog

Alle Werkzeuge, die diese Website bereitstellen kann, und wo sie verfügbar sind.

Jede Seite

list_pages Jetzt aktiv Nur lesend

Lists the pages of this website, the article ids, the supported languages and the page that is open now.

Keine Eingabe

navigate_to_page Jetzt aktiv

Opens a page of this website in the current language. For a specific article pass page "articles" and its article id.

Eingabeschema
{
  "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 Jetzt aktiv

Switches the website language and keeps the current page open.

Eingabeschema
{
  "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 Jetzt aktiv

Switches the website between the light and the dark color scheme.

Eingabeschema
{
  "type": "object",
  "properties": {
    "scheme": {
      "type": "string",
      "enum": [
        "light",
        "dark"
      ]
    }
  },
  "required": [
    "scheme"
  ]
}
set_seasonal_effect Jetzt aktiv

Sets the decorative animated overlay. "auto" picks one by date: snow in winter, butterflies in spring, halloween in October.

Eingabeschema
{
  "type": "object",
  "properties": {
    "effect": {
      "type": "string",
      "enum": [
        "auto",
        "off",
        "snow",
        "butterflies",
        "halloween"
      ]
    }
  },
  "required": [
    "effect"
  ]
}

Minesweeper-Seite

Seite öffnen
minesweeper_get_board Jetzt aktiv Nur lesend

Returns the visible board, the game status and the counters. Hidden cells never reveal whether they hold a mine.

Keine Eingabe

minesweeper_reveal_cell Jetzt aktiv

Reveals a hidden cell, like a left click. Revealing a mine loses the game. Returns the updated board.

Eingabeschema
{
  "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 Jetzt aktiv

Toggles a flag on a hidden cell, like a right click. Returns the updated board.

Eingabeschema
{
  "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 Jetzt aktiv Mit Folgen

Discards 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).

Eingabeschema
{
  "type": "object",
  "properties": {
    "difficulty": {
      "type": "string",
      "enum": [
        "beginner",
        "intermediate",
        "expert",
        "custom"
      ]
    }
  }
}

Witze-Bot-Seite

Seite öffnen
ask_joke_botNicht vertrauenswürdige Ausgabe

Sends a message to the AI joke bot on this page. The message and the answer appear in the chat. Returns the joke.

Eingabeschema
{
  "type": "object",
  "properties": {
    "topic": {
      "type": "string",
      "description": "Topic or message for the joke bot."
    }
  },
  "required": [
    "topic"
  ]
}

Für Entwickler

Werkzeuge sind einfache Konstanten, die Angular-Services aufrufen. Die Registrierung bindet sie an die Lebensdauer der App oder einer Komponente.

Ein Werkzeug definieren

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}.`;
  },
});

Werkzeuge für jede Seite registrieren

export const appConfig: ApplicationConfig = {
  providers: [
    provideWebMcpTools('site', SITE_WEBMCP_TOOLS),
  ],
};

Werkzeuge für eine Komponente registrieren

export class MinesweeperComponent {
  constructor() {
    declareWebMcpTools('minesweeper', MINESWEEPER_WEBMCP_TOOLS);
  }
}

In der DevTools-Konsole ausprobieren

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 });