Azure Monitor · Capability

Azure Monitor Logs API — Query

Azure Monitor Logs API — Query. 2 operations. Lead operation: Azure Monitor Execute a Log Analytics query via GET. Self-contained Naftiko capability covering one Microsoft Azure Monitor business surface.

Run with Naftiko Microsoft Azure MonitorQuery

What You Can Do

GET
Queryget — Azure Monitor Execute a Log Analytics query via GET
/v1/workspaces/{workspaceid}/query
POST
Queryexecute — Azure Monitor Execute a Log Analytics query via POST
/v1/workspaces/{workspaceid}/query

MCP Tools

azure-monitor-execute-log-analytics

Azure Monitor Execute a Log Analytics query via GET

read-only idempotent
azure-monitor-execute-log-analytics-2

Azure Monitor Execute a Log Analytics query via POST

read-only

Capability Spec

azure-monitor-logs-query.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Azure Monitor Logs API — Query
  description: 'Azure Monitor Logs API — Query. 2 operations. Lead operation: Azure Monitor Execute a Log Analytics query
    via GET. Self-contained Naftiko capability covering one Microsoft Azure Monitor business surface.'
  tags:
  - Microsoft Azure Monitor
  - Query
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MICROSOFT_AZURE_MONITOR_API_KEY: MICROSOFT_AZURE_MONITOR_API_KEY
capability:
  consumes:
  - type: http
    namespace: azure-monitor-logs-query
    baseUri: https://api.loganalytics.io/v1
    description: Azure Monitor Logs API — Query business capability. Self-contained, no shared references.
    resources:
    - name: workspaces-workspaceId-query
      path: /workspaces/{workspaceId}/query
      operations:
      - name: queryget
        method: GET
        description: Azure Monitor Execute a Log Analytics query via GET
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          description: The Analytics query in KQL format.
          required: true
        - name: timespan
          in: query
          type: string
          description: The timespan over which to query data in ISO 8601 duration format.
      - name: queryexecute
        method: POST
        description: Azure Monitor Execute a Log Analytics query via POST
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.MICROSOFT_AZURE_MONITOR_API_KEY}}'
  exposes:
  - type: rest
    namespace: azure-monitor-logs-query-rest
    port: 8080
    description: REST adapter for Azure Monitor Logs API — Query. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/workspaces/{workspaceid}/query
      name: workspaces-workspaceid-query
      description: REST surface for workspaces-workspaceId-query.
      operations:
      - method: GET
        name: queryget
        description: Azure Monitor Execute a Log Analytics query via GET
        call: azure-monitor-logs-query.queryget
        with:
          query: rest.query
          timespan: rest.timespan
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: queryexecute
        description: Azure Monitor Execute a Log Analytics query via POST
        call: azure-monitor-logs-query.queryexecute
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: azure-monitor-logs-query-mcp
    port: 9090
    transport: http
    description: MCP adapter for Azure Monitor Logs API — Query. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: azure-monitor-execute-log-analytics
      description: Azure Monitor Execute a Log Analytics query via GET
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: azure-monitor-logs-query.queryget
      with:
        query: tools.query
        timespan: tools.timespan
      outputParameters:
      - type: object
        mapping: $.
    - name: azure-monitor-execute-log-analytics-2
      description: Azure Monitor Execute a Log Analytics query via POST
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: azure-monitor-logs-query.queryexecute
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.