## ADDED Requirements

### Requirement: Tool config supports runtime fields
The system SHALL support additional configuration fields for tool instances: `start_command`, `port`, `working_directory`, `environment_variables`, and `volumes`.

#### Scenario: Create config with runtime fields
- **WHEN** user creates a tool config with start_command="npm start", port=3000, working_directory="/app"
- **THEN** the config is saved with all fields populated

#### Scenario: Environment variables as JSON
- **WHEN** user sets environment_variables to {"NODE_ENV": "production", "API_KEY": "secret"}
- **THEN** the system stores and returns the config with the JSON object preserved

#### Scenario: Volumes as JSON
- **WHEN** user sets volumes to [{"host": "/data", "container": "/app/data", "mode": "rw"}]
- **THEN** the system stores and returns the config with the JSON array preserved

### Requirement: Split-pane UI for tool configs
The system SHALL present tool configs in a split-pane layout with a list on the left and detail/edit panel on the right.

#### Scenario: Browse tool configs
- **WHEN** user navigates to /tool-configs
- **THEN** the left panel displays a scrollable list of all tool configs grouped by tool type

#### Scenario: Select config to edit
- **WHEN** user clicks on a config in the left panel
- **THEN** the right panel displays the config details in an editable form

#### Scenario: Create new config
- **WHEN** user clicks "New Config" button
- **THEN** a blank form appears in the right panel for creating a new config

### Requirement: JSON editor for complex fields
The system SHALL provide user-friendly editors for JSON fields (environment_variables and volumes) that validate JSON syntax.

#### Scenario: Valid JSON input
- **WHEN** user enters valid JSON in the environment_variables field
- **THEN** the form accepts the input and shows a green indicator

#### Scenario: Invalid JSON input
- **WHEN** user enters invalid JSON in the environment_variables field
- **THEN** the form shows a red error indicator and prevents saving

### Requirement: Config validation
The system SHALL validate tool config fields before saving.

#### Scenario: Invalid port number
- **WHEN** user enters port=70000
- **THEN** the system rejects the config with error "Port must be between 1 and 65535"

#### Scenario: Missing required fields
- **WHEN** user attempts to save a config without key or tool_type_id
- **THEN** the system rejects the config with error "Key is required"