
    T                        S r SSKrSSKJr  SSKJr  SSKJr  SSKJr  \R                  \R                  " \R                  R                  \R                  R                  5       " S S\R                  5      5       5       rg)	zservices mcp list command.    N)services_util)serviceusage)base)common_flagsc                   .    \ rS rSrSr\S 5       rS rSrg)List   a  List MCP services for a project, folder or organization.

This command lists the MCP services that are enabled or available (with MCP
endpoints) to be MCP enabled
by a project, folder or organization.

## EXAMPLES

To list the services the current project has enabled for MCP, run:

  $ {command} --enabled

To list the services the current project can enable for MCP, run:

  $ {command} --available
c                 F   U R                  SS9nUR                  SSSS9  UR                  SSSS9  [        R                  " U 5        [        R
                  R                  U S	5        [        R                  R                  U 5        U R                  R                  S
5        g)zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.
F)requiredz	--enabled
store_truezX(DEFAULT) Return the MCP services which the project, folder or organization has enabled.)actionhelpz--availablezWReturn the services available to the project, folder or organization to enable for MCP.i  zp
        table(
            name:label=NAME:sort=1,
            mcp_endpoint:label=MCP_ENDPOINT
        )
      N)add_mutually_exclusive_groupadd_argumentr   add_resource_argsr   PAGE_SIZE_FLAG
SetDefaultURI_FLAGRemoveFromParserdisplay_info	AddFormat)parser
mode_groups      lib/surface/services/mcp/list.pyArgs	List.Args.   s     44e4DJ)	   A	   ""6*""640 	MM""6*
!! #
     c           	      .   UR                   (       d  UR                  (       d  SUl         UR                  S5      (       a  UR                  nO [        R
                  " UR                  5      nUR                  S5      (       a  UR                  nOSnUR                  S5      (       a  UR                  nOSnUR                  S5      (       a  UR                  nO[        R                  n[        R                  " UUR                   UR                  UUUS9$ )zRun 'services mcp list'.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  The list of MCP services for the given project, folder or organization.
TprojectfolderNorganizationlimit)r"   r    r!   )enabled	availableIsSpecifiedr   r   GetValidatedProjectr    r!   r"   sysmaxsizer   ListMcpServicesV2Beta	page_size)selfargsr   r    r!   r"   s         r   RunList.RunX   s     LLDNNdl	""g11$,,?g!!{{ff''&&ll  jjekke--! r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r-   __static_attributes__r/   r   r   r   r      s!    " ' 'R'r   r   )r4   r'   googlecloudsdk.api_lib.servicesr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.servicesr   UniverseCompatibleReleaseTracksReleaseTrackALPHABETAListCommandr   r/   r   r   <module>r@      sq     ! 
 9 8 ( < D%%++T->->-C-CDc4 c E cr   