Context / Client / list_agent_contexts

list_agent_contexts

Context.Client.list_agent_contexts(**kwargs)

Lists the agent contexts in your account. A page can hold fewer items than maxResults, or none, and still return a nextToken. Keep paging until nextToken is absent.

See also: AWS API Documentation

Request Syntax

response = client.list_agent_contexts(
    maxResults=123,
    nextToken='string'
)
Parameters:
  • maxResults (integer) – Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.

  • nextToken (string) – Opaque pagination cursor from a prior response. Omit for the first page.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'workforceSignInConfig': {
                'status': 'ENABLED'|'DISABLED',
                'signInUrl': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • items (list) –

      The agent contexts in your account, as summaries, most recently updated first.

      • (dict) –

        Condensed representation of an agent context for ListAgentContexts.

        • id (string) –

          The agent context’s opaque ID.

        • arn (string) –

          The agent context’s ARN.

        • name (string) –

          The agent context’s friendly name.

        • description (string) –

          A human-readable description. Absent when none was set.

        • status (string) –

          The agent context’s lifecycle status.

          Valid values:

          • CREATING - The agent context is being created.

          • ACTIVE - The agent context is ready to use.

          • UPDATING - The agent context is being updated.

          • DELETING - The agent context is being deleted.

          • FAILED - The agent context failed.

        • createdAt (datetime) –

          The date and time when the agent context was created.

        • updatedAt (datetime) –

          When the resource last changed. Equal to createdAt until the first update.

        • workforceSignInConfig (dict) –

          How your employees sign in to this agent context’s MCP server through your identity provider (workforce sign-in). status reads ENABLED while a sign-in URL is stored, DISABLED otherwise.

          • status (string) –

            Whether workforce sign-in is on. Reads ENABLED while a signInUrl is stored, DISABLED otherwise. On Create, a config with a signInUrl defaults to ENABLED. On Update, DISABLED removes the stored signInUrl. ENABLED requires a signInUrl, supplied in the same request or already stored on the resource.

          • signInUrl (string) –

            The URL that starts a sign-in to your AWS application at the identity provider. For example, an Okta application link, a Microsoft Entra My Apps link, or an IAM Identity Center access portal URL. HTTPS only, a single line with no whitespace, 9 to 2048 characters. Sent alone, it replaces the stored URL and turns sign-in ENABLED. It cannot be sent together with status DISABLED in the same request.

    • nextToken (string) –

      Pagination cursor for the next page. Absent when no more results exist.

Exceptions