# How Google Agent Skills Enable Intent-Based Invocation: A Technical Deep Dive

> Explore how Google Agent Skills use declarative metadata for intent-based invocation. Learn how the MCP server automatically routes requests without hard-coded logic.

- Repository: [Google/skills](https://github.com/google/skills)
- Tags: deep-dive
- Published: 2026-09-04

---

**Google Agent Skills utilize a declarative metadata approach where [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) files declare intents and the MCP (Model-Configured Platform) server classifies user prompts to route requests automatically, eliminating the need for hard-coded routing logic.**

The `google/skills` repository implements a declarative framework for building agent capabilities that respond to natural language. By separating intent declaration from implementation logic, the system enables scalable, metadata-driven invocation where the runtime automatically matches user requests to the appropriate skill handler based on the declared intents.

## Declarative Intent Declaration in SKILL.md

At the core of the architecture is the [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) file, which acts as the contract between the user and the agent. This file defines the **intent names**, expected **input shapes**, and execution steps required to fulfill requests.

Specifically, the `## Step 2 — Route by intent` section within [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) contains a mapping table that links natural language patterns to specific handlers. For example, in [`skills/cloud/google-cloud-storage-fuse/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/google-cloud-storage-fuse/SKILL.md), the file declares intents like `create-bucket` and `list-buckets` with corresponding user prompt patterns:

```yaml

## Step 2 — Route by intent

| User intent (prompt shape) | Go to |
|----------------------------|-------|
| *create a Cloud Storage bucket* | create-bucket |
| *list my Cloud Storage buckets* | list-buckets |

```

## MCP Server and Intent Classification

The **MCP (Model-Configured Platform) server** hosts the NLU model responsible for analyzing incoming prompts. When a user submits a request, the Agent Skills runtime forwards the prompt to the MCP server, which extracts the intent and matches it against the declarations in registered [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) files.

This routing configuration is maintained in [`plugins/cloud/google-cloud-developer/mcp.json`](https://github.com/google/skills/blob/main/plugins/cloud/google-cloud-developer/mcp.json), which provides the server with the necessary metadata to route intents correctly. The [`plugin.json`](https://github.com/google/skills/blob/main/plugin.json) file in the same directory handles the plugin registration with the Agent Skills platform, ensuring the MCP server recognizes the skill's available intents.

## The Five-Step Intent-Based Execution Flow

The intent-based invocation follows a strict pipeline that bridges natural language to executable code:

1. **Prompt Submission** — The user prompt is sent to the MCP server via the Agent Skills runtime.
2. **Intent Classification** — The NLU model analyzes the prompt and matches it to a declared intent in the skill definitions.
3. **Skill Selection** — The runtime identifies the skill whose [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) lists the matched intent.
4. **Parameter Extraction and Validation** — Arguments are extracted and validated against the **JSON schema** defined in the skill's input shape specification.
5. **Skill Execution** — The concrete implementation (a script, Cloud Run service, or other executable) runs and returns the result to the user.

## Input Validation and Handler Implementation

After routing, the runtime validates user arguments against the input shape defined in the skill's metadata. The handler receives a pre-validated request object containing the intent name and parameters, allowing the implementation to focus purely on business logic rather than parsing or validation.

```python
import json

def handle(request):
    # `request` is already validated against the skill's input schema

    intent = request["intent"]          # e.g., "create-bucket"

    params = request["parameters"]      # dict with user-provided arguments

    if intent == "create-bucket":
        return create_bucket(params["bucket_name"])
    elif intent == "list-buckets":
        return list_buckets()

```

Because the runtime handles the routing decision, the skill implementation contains no conditional dispatch logic for intent matching—it simply processes the pre-identified intent and validated parameters.

## Registering Skills via the Agent-Skills CLI

New skills are registered using the Agent-Skills CLI, which reads the [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) metadata and updates the MCP server's routing table. As documented in [`CONTRIBUTING.md`](https://github.com/google/skills/blob/main/CONTRIBUTING.md), this process extracts intent declarations automatically without manual server configuration.

```bash
google-agents-cli-workflow register \
  --skill-path=skills/cloud/google-cloud-storage-fuse \
  --mcp-endpoint=https://mcp.example.com

```

This command packages the skill definition and registers the intents with the MCP server, making the new capabilities immediately available for intent-based invocation without changes to the core platform code.

## Summary

- **Declarative Metadata**: Skills declare intents in [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md), separating routing logic from business logic.
- **MCP Server**: The Model-Configured Platform server handles NLU classification and intent matching against registered skill definitions.
- **Automatic Routing**: The runtime routes requests based on metadata declarations, not hard-coded conditionals in the skill code.
- **Schema Validation**: Input parameters are validated against JSON schemas defined in the skill metadata before reaching the handler.
- **CLI Registration**: The `google-agents-cli-workflow` command automates skill registration and intent publishing to the MCP server.

## Frequently Asked Questions

### What file declares the intents a Google Agent Skill can handle?

The [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) file declares intents in the `## Step 2 — Route by intent` section, mapping natural language patterns to specific handlers. This file resides in the skill's root directory, such as [`skills/cloud/google-cloud-storage-fuse/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/google-cloud-storage-fuse/SKILL.md), and serves as the single source of truth for what the skill can do.

### How does the MCP server classify user intents?

The MCP (Model-Configured Platform) server runs an NLU model that analyzes the incoming prompt and matches it against the intent declarations found in registered [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) files. The routing configuration and server settings are stored in [`plugins/cloud/google-cloud-developer/mcp.json`](https://github.com/google/skills/blob/main/plugins/cloud/google-cloud-developer/mcp.json), which guides the classification process.

### Can I implement a skill without hard-coding routing logic?

Yes. The Agent Skills runtime handles routing automatically based on the [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) metadata. Your implementation only needs to handle the specific intent logic, as the request arrives pre-routed and pre-validated according to the declared input schema.

### How are input parameters validated during intent invocation?

After intent classification, the runtime validates extracted parameters against the JSON schema defined in the skill's input shape specification within [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md). The handler receives a validated request object, ensuring type safety and structure compliance before execution begins.