list_applications
Retrieve all applications in SD Elements with options to paginate, include additional fields, or expand specific details for comprehensive access.
Instructions
List all applications in SD Elements
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expand | No | Fields to expand (comma-separated) | |
| include | No | Additional fields to include (comma-separated) | |
| page_size | No | Number of results per page (optional) |
Implementation Reference
- The handler function for the 'list_applications' MCP tool. It initializes the API client if necessary, builds query parameters, calls the API to list applications, and returns the result as formatted JSON. The @mcp.tool() decorator registers it as an MCP tool, and the function signature with docstring defines the input schema.
@mcp.tool() async def list_applications(ctx: Context, page_size: Optional[int] = None, include: Optional[str] = None, expand: Optional[str] = None) -> str: """List all applications""" global api_client if api_client is None: api_client = init_api_client() params = build_params({"page_size": page_size, "include": include, "expand": expand}) result = api_client.list_applications(params) return json.dumps(result, indent=2) - src/sde_mcp_server/server.py:296-296 (registration)Import of the tools package in the main server.py, which transitively imports tools/applications.py and registers all tools including 'list_applications'.
from . import tools # noqa: F401