# Session 2026-06-07 (cont.) — Phase 7: source config tools

## What's new
Four new MCP tools for managing source config from chat without DB edits:

- **`get_source_config(name)`** — read the current throttle + config_json for a source
- **`set_source_throttle(name, min_delay, max_delay, reqs_per_hour)`** — adjust per-source rate limits; only the params you pass are changed; basic validation (non-negative, min ≤ max); writes to `sources.config_json.throttle`. Includes a docstring with sensible ranges per source so the LLM picks reasonable values
- **`set_source_config(name, key, value)`** — set any other config key (api_key, app_id, app_key, user_agent_email, company_tokens). Auto-redacts secrets when returning
- **`enable_source(name, enabled=True)`** — flip on/off without losing config

## Verified live
Override propagation test:
```
BEFORE: linkedin: min=2.0s max=5.0s hourly_cap=180
AFTER:  linkedin: min=1.5s max=4.0s hourly_cap=250  ← override applied
        greenhouse/lever unchanged
```
Fresh scraper instances pick up the new throttle on every `registry.get(name)`
call (no service restart needed).

## Usage from Claude Desktop

```
# See current state
get_source_config name="linkedin"

# Tighten LinkedIn after a 429 wave
set_source_throttle name="linkedin" min_delay=4.0 max_delay=8.0 reqs_per_hour=90

# Drop in USAJobs API key when you get it
set_source_config name="usajobs" key="auth_key" value="<the-key>"
enable_source name="usajobs"

# Bulk-add Greenhouse companies
set_source_config name="greenhouse" key="company_tokens" \
    value=["airbnb","stripe","discord","cloudflare","datadog","mongodb"]
```

## Total MCP tools: 29
| Group | Count | Tools |
|---|---|---|
| Sources & search | 8 | list_sources, search_jobs, search_all, get_job, list_jobs, mark_job, set_notes, fetch_details |
| Profile & matching | 7 | set_profile, get_profile, score_new_jobs, score_all, top_jobs, list_resumes, register_resume |
| Source config | **4** | get_source_config, set_source_throttle, set_source_config, enable_source |
| Apply | 5 | plan_apply, dry_run_apply, submit_apply, list_applications, cancel_application |
| Schedule | 4 | add_schedule, list_schedules, remove_schedule, run_schedule_now |
| Ops | 1 | db_stats |

## Open / next
- More sources (held per Michael — when ready: Wellfound, Ashby, SmartRecruiters, RemoteOK)
- Gmail watcher for application-confirmation emails (held per Michael — only worth it after real submits start happening)
- Real resume + profile values
