Skill (en)
# List organization IDs
## What this tool does
Lists the organization IDs available to a configured iiko client after authenticating with that client's `apiLogin`.
## Inputs
- one client: `--client <slug>`
- several clients: `--clients <slug_one,slug_two>`
- all configured clients: `--all-clients`
- optional JSON output: `--json`
- optional config source: `--use-local-env` or `--no-use-local-env` (MCP: `use_local_env`); default follows `IIKO_DEFAULT_USE_LOCAL_ENV` (false = Postgres-first when implemented)
## Output
- default output is Markdown
- JSON output is available with `--json`
- each result includes the client slug, client name, and discovered organizations
## Shared pieces used
- `IikoSettings`, `get_client_settings`, `get_client_settings_many`
- `get_access_token()`
- `get_available_organizations()`
- `IikoTransport`
## Testing instructions
- run the focused tests:
- `.venv/bin/python -m pytest tests/commands/test_list_organization_ids.py -q`
- smoke-test the CLI manually:
- `.venv/bin/python -m iiko_api_mcp_server.commands.list_organization_ids --client client_one`
- `.venv/bin/python -m iiko_api_mcp_server.commands.list_organization_ids --all-clients --json`
## Testing quality
- unit tests cover the shared command result, Markdown rendering, and multi-client CLI execution
- residual risk: live organization payloads may contain more fields than the current tests exercise