Tomasz Czajka

AI एजेंट्स

WebMCP: यह वेबसाइट AI एजेंट्स से बात करती है

WebMCP एक नया ब्राउज़र स्टैंडर्ड है। वेब पेज बताता है कि वह क्या-क्या कर सकता है, टूल्स के रूप में, जिनमें हर एक का नाम, विवरण और JSON इनपुट स्कीमा होता है। फिर ब्राउज़र में मौजूद AI एजेंट यह अंदाज़ा लगाने के बजाय कि कहाँ क्लिक करना है, इन्हीं टूल्स के ज़रिए साइट का इस्तेमाल करता है।

आपका ब्राउज़र

जाँच हो रही है…

किसी असली एजेंट को जोड़ने के लिए हाल का Chrome इस्तेमाल करें और chrome://flags में "WebMCP for testing" फ़्लैग ऑन करें।

यह कैसे काम करता है

  1. 1

    पेज टूल्स घोषित करता है

    हर फ़ीचर अपने टूल्स Angular में रजिस्टर करता है। माइनस्वीपर के टूल्स तभी मौजूद रहते हैं, जब गेम स्क्रीन पर हो।

  2. 2

    ब्राउज़र उन्हें लिस्ट करता है

    ब्राउज़र एजेंट को खुले पेज के टूल्स दिखाता है: नाम, विवरण और इनपुट स्कीमा।

  3. 3

    एजेंट टूल को कॉल करता है

    टूल वही Angular सर्विस कॉल करता है जो बटन करते हैं, इसलिए पेज ऐसे अपडेट होता है जैसे किसी इंसान ने क्लिक किया हो।

प्लेग्राउंड

किसी टूल को वैसे ही कॉल करें जैसे एजेंट करता। दाईं ओर का गेम लाइव है, इसलिए उसके टूल्स भी इस पेज पर एक्टिव हैं।

माइनस्वीपर

कठिनाई

बचे हुए बम 10
लगाए गए फ़्लैग 0
स्कोर 0
प्रगति 0 / 71
किसी सेल को खोलने के लिए लेफ़्ट क्लिक करें। फ़्लैग लगाने के लिए राइट क्लिक करें।

एक्टिविटी लॉग

इस साइट पर हर टूल कॉल, चाहे AI एजेंट से हो या प्लेग्राउंड से। JSON देखने के लिए किसी पंक्ति को खोलें।

  • अभी तक कोई टूल कॉल नहीं हुई। प्लेग्राउंड में कोई टूल चलाएँ या किसी एजेंट को खेलने दें।

टूल कैटलॉग

वे सभी टूल्स जो यह वेबसाइट उपलब्ध करा सकती है, और वे कहाँ उपलब्ध हैं।

हर पेज

list_pages अभी एक्टिव सिर्फ़ पढ़ने के लिए

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

कोई इनपुट नहीं

navigate_to_page अभी एक्टिव

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 अभी एक्टिव

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 अभी एक्टिव

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 अभी एक्टिव

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 अभी एक्टिव सिर्फ़ पढ़ने के लिए

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

कोई इनपुट नहीं

minesweeper_reveal_cell अभी एक्टिव

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 अभी एक्टिव

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 अभी एक्टिव असर डालने वाला

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

इनपुट स्कीमा
{
  "type": "object",
  "properties": {
    "difficulty": {
      "type": "string",
      "enum": [
        "beginner",
        "intermediate",
        "expert",
        "custom"
      ]
    }
  }
}

जोक बॉट पेज

पेज खोलें
ask_joke_botअविश्वसनीय आउटपुट

Sends 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"
  ]
}

डेवलपर्स के लिए

टूल्स साधारण constants हैं, जो Angular सर्विसेज़ को कॉल करते हैं। रजिस्ट्रेशन उन्हें ऐप या किसी कंपोनेंट के लाइफ़टाइम से जोड़ता है।

टूल डिफ़ाइन करें

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

हर पेज के लिए टूल्स रजिस्टर करें

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

एक कंपोनेंट के लिए टूल्स रजिस्टर करें

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

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