Skip to content

Completions

From docs/MCP_TOOLS.md on GitHub

completion/complete is served for every template variable in the table above and for prompt arguments (dataset, ref, finding_id, framework, severity, base, target). The layer returns at most 100 values; total counts every match and hasMore is true when more than 100 matched. Completions pass through the policy like any read: they are rate limited and their values transformed, so a pseudonymising policy completes to pseudonyms.

Completer Matching
dataset, base, target Loaded dataset names starting with the input (case-insensitive).
ref Assets of the dataset named in the request's context arguments, else the active one. Unique names complete to the name, shared names to the ARN or id. Prefix matches on name, ARN or id come first (sorted), then substring matches.
finding_id Finding ids starting with the input, highest risk first.
severity Severity names starting with the input (upper-cased).
framework Frameworks in the dataset (compliance results and finding tags) containing the input; the ruleset frameworks when the dataset has none.
format d3, cytoscape, graphml, or turtle, json-ld, xml, nt.
asset_type AssetType values starting with the input (upper-cased).
topic Documentation topics starting with the input.

Arguments without a completer (the prompt argument change, for example) return an empty list.

{
  "request": {
    "ref": {
      "type": "ref/resource",
      "uri": "cloudg://assets/{+ref}"
    },
    "argument": {
      "name": "ref",
      "value": "web"
    }
  },
  "completion": {
    "values": [
      "web-1",
      "web-2",
      "web-acl",
      "... 3 more"
    ],
    "total": 6,
    "hasMore": false
  }
}
{
  "request": {
    "ref": {
      "type": "ref/resource",
      "uri": "cloudg://assets/{+ref}/neighbors"
    },
    "argument": {
      "name": "ref",
      "value": "arn:aws:iam"
    }
  },
  "completion": {
    "values": [
      "api-lambda-role",
      "app-role",
      "bastion-admin",
      "... 4 more"
    ],
    "total": 7,
    "hasMore": false
  }
}
{
  "request": {
    "ref": {
      "type": "ref/resource",
      "uri": "cloudg://compliance/{framework}"
    },
    "argument": {
      "name": "framework",
      "value": "cis"
    }
  },
  "completion": {
    "values": [
      "CIS-AWS",
      "CIS-Azure",
      "CIS-GCP"
    ],
    "total": 3,
    "hasMore": false
  }
}
{
  "request": {
    "ref": {
      "type": "ref/prompt",
      "name": "investigate_asset"
    },
    "argument": {
      "name": "ref",
      "value": "orders"
    }
  },
  "completion": {
    "values": [
      "orders-db",
      "orders-db-credentials"
    ],
    "total": 2,
    "hasMore": false
  }
}

With dataset in the context arguments, ref completes against that dataset. In after the WAF web-acl no longer exists, so it is missing here:

{
  "request": {
    "ref": {
      "type": "ref/prompt",
      "name": "investigate_asset"
    },
    "argument": {
      "name": "ref",
      "value": "web"
    },
    "context": {
      "arguments": {
        "dataset": "after"
      }
    }
  },
  "completion": {
    "values": [
      "web-1",
      "web-2",
      "web-alb",
      "... 2 more"
    ],
    "total": 5,
    "hasMore": false
  }
}
{
  "request": {
    "ref": {
      "type": "ref/prompt",
      "name": "incident_triage"
    },
    "argument": {
      "name": "finding_id",
      "value": "f-r"
    }
  },
  "completion": {
    "values": [
      "f-rdp-open"
    ],
    "total": 1,
    "hasMore": false
  }
}
{
  "request": {
    "ref": {
      "type": "ref/resource",
      "uri": "cloudg://docs/{topic}"
    },
    "argument": {
      "name": "topic",
      "value": "d"
    }
  },
  "completion": {
    "values": [
      "data-models",
      "dependencies"
    ],
    "total": 2,
    "hasMore": false
  }
}