MCP Tools Reference

Complete documentation for all 12 MCP tools available to AI assistants.

Observe

View service status, logs, and configuration

get_services

List all services with their current status, ports, and health information.

Returns

Array of service objects with name, status, port, and health fields

Example

Prompt: "What services are running?"
json
[
  {
    "name": "web",
    "status": "running",
    "port": 3000,
    "health": "healthy"
  },
  {
    "name": "api",
    "status": "running",
    "port": 8080,
    "health": "unhealthy"
  }
]

Use Cases

  • Check which services are currently running
  • Identify unhealthy services
  • Get port numbers for debugging

get_service_logs

Retrieve logs from services, with optional filtering by service name, time range, and log level. Use tail parameter for large log retrieval (up to 10,000 lines).

Parameters

Name Type Required Description
serviceName string No Name of the service (optional, omit for all services)
tail number No Number of lines to return (default: 100, max: 10000)
level string No Filter by log level: error, warn, info, debug, all
since string No Time filter, e.g., '5m', '1h', '30s'

Returns

Array of log entries with timestamp, level, and message

Example

Prompt: "Show me all logs from the API service"
json
[
  {
    "timestamp": "2024-01-15T10:32:15Z",
    "level": "error",
    "message": "Connection refused to database at localhost:5432"
  },
  {
    "timestamp": "2024-01-15T10:32:45Z",
    "level": "info",
    "message": "Retrying database connection..."
  }
]

Use Cases

  • Get complete log history for a service
  • Find specific patterns across all log levels
  • Track request patterns and debug performance

get_service_errors

Get only error logs with surrounding context lines for AI debugging. Optimized for quickly identifying and understanding errors.

Parameters

Name Type Required Description
serviceName string No Filter to a specific service (optional)
since string No Time filter, e.g., '5m', '10m', '1h' (default: 10m)
tail number No Max log lines to scan (default: 500)
contextLines number No Lines of context before/after each error (default: 3, max: 10)

Returns

Summary with error count and array of errors with context

Example

Prompt: "What errors are happening in my services?"
json
{
  "summary": {
    "totalErrors": 2,
    "totalLogs": 150,
    "since": "10m"
  },
  "errors": [
    {
      "service": "api",
      "message": "Connection refused to database",
      "level": "ERROR",
      "timestamp": "2024-01-15T10:32:15Z",
      "context": {
        "before": ["Attempting database connection..."],
        "after": ["Retrying in 5 seconds..."]
      }
    }
  ]
}

Use Cases

  • Quick diagnosis - find all errors across services
  • AI debugging - context helps understand error cause
  • Triage - see error summary before diving into full logs

get_project_info

Get project configuration from azure.yaml including services, dependencies, and settings.

Returns

Project configuration object with services, name, and metadata

Example

Prompt: "What's configured in this project?"
json
{
  "name": "my-app",
  "services": {
    "web": {
      "project": "./src/web",
      "language": "js",
      "host": "appservice"
    },
    "api": {
      "project": "./src/api",
      "language": "python",
      "host": "containerapp"
    }
  }
}

Use Cases

  • Understand project architecture
  • Verify service configuration
  • Debug configuration issues

Operate

Start, stop, and manage services

run_services

Start all services or specific services by name.

Parameters

Name Type Required Description
services string[] No Optional list of service names to start

Returns

Status of started services

Example

Prompt: "Start all services"
json
{
  "started": ["web", "api", "worker"],
  "status": "running"
}

Use Cases

  • Start development environment
  • Restart after code changes
  • Start specific services for testing

stop_services

Stop all running services or specific services by name.

Parameters

Name Type Required Description
services string[] No Optional list of service names to stop

Returns

Status of stopped services

Example

Prompt: "Stop the worker service"
json
{
  "stopped": ["worker"],
  "status": "stopped"
}

Use Cases

  • Stop services before making changes
  • Free up system resources
  • Isolate services for debugging

restart_service

Restart a specific service to apply configuration changes or recover from errors.

Parameters

Name Type Required Description
service string Yes Name of the service to restart

Returns

Restart status with timing information

Example

Prompt: "Restart the API service"
json
{
  "service": "api",
  "status": "restarted",
  "duration": "2.3s"
}

Use Cases

  • Apply code changes without full restart
  • Recover from transient errors
  • Reset service state

install_dependencies

Install dependencies for all services based on their project type (npm, pip, etc.).

Parameters

Name Type Required Description
service string No Optional specific service to install deps for

Returns

Installation status for each service

Example

Prompt: "Install all dependencies"
json
{
  "web": { "status": "installed", "packages": 145 },
  "api": { "status": "installed", "packages": 32 }
}

Use Cases

  • Initial project setup
  • After pulling new changes
  • Fix missing dependency errors

Configure

Check requirements and manage environment

check_requirements

Verify that all prerequisites for the project are installed (Node.js, Python, Docker, etc.).

Returns

Requirements check results with version information

Example

Prompt: "Are all requirements met?"
json
{
  "passed": true,
  "requirements": [
    { "name": "Node.js", "required": ">=18", "installed": "20.10.0", "met": true },
    { "name": "Python", "required": ">=3.9", "installed": "3.11.0", "met": true },
    { "name": "Docker", "required": ">=20", "installed": "24.0.7", "met": true }
  ]
}

Use Cases

  • Initial project setup verification
  • Troubleshoot why services won't start
  • Check versions before upgrade

get_environment_variables

Get environment variables for a service. Sensitive values are redacted.

Parameters

Name Type Required Description
service string Yes Name of the service

Returns

Environment variables with sensitive values redacted

Example

Prompt: "What environment variables does the API use?"
json
{
  "service": "api",
  "variables": {
    "DATABASE_URL": "postgresql://localhost:5432/mydb",
    "API_KEY": "[REDACTED]",
    "LOG_LEVEL": "debug",
    "PORT": "8080"
  }
}

Use Cases

  • Verify environment configuration
  • Debug configuration issues
  • Check for missing variables

set_environment_variable

Set an environment variable for a service. Takes effect on next restart.

Parameters

Name Type Required Description
service string Yes Name of the service
name string Yes Variable name
value string Yes Variable value

Returns

Confirmation of the variable being set

Example

Prompt: "Set LOG_LEVEL to debug for the API"
json
{
  "service": "api",
  "variable": "LOG_LEVEL",
  "value": "debug",
  "status": "set",
  "note": "Restart the service for changes to take effect"
}

Use Cases

  • Enable debug logging
  • Configure feature flags
  • Set development overrides