stdin: {"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"toolwitness","version":"s772-v0"},"protocolVersion":"2025-11-25"}} {"jsonrpc":"2.0","method":"notifications/initialized"} {"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}} stdout: {"result":{"protocolVersion":"2025-11-25","capabilities":{"logging":{},"tools":{"listChanged":true}},"serverInfo":{"name":"optibot","version":"1.3.2"}},"jsonrpc":"2.0","id":1} {"result":{"tools":[{"name":"review_local_changes","description":"Review uncommitted local changes (git diff HEAD). Runs an AI code review on all staged and unstaged changes in the current repository.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"review_branch","description":"Review changes against a target branch. Compares the current branch against the specified branch (or auto-detects origin/main, origin/master, origin/develop). Includes merge conflict detection.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"branch":{"description":"Target branch to compare against. If omitted, auto-detects origin/main, origin/master, or origin/develop.","type":"string"}}},"execution":{"taskSupport":"forbidden"}},{"name":"review_diff_file","description":"Review an arbitrary diff/patch file. Sends the contents of a diff file for AI code review.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"file_path":{"type":"string","description":"Path to the diff or patch file to review"}},"required":["file_path"]},"execution":{"taskSupport":"forbidden"}},{"name":"login","description":"Authenticate with Optibot via browser OAuth. Opens a browser window for login and saves credentials locally. Token expires after 90 days. If your account needs onboarding, returns a URL to complete setup before you can authenticate. Refuses to run inside CI environments.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"logout","description":"Remove saved Optibot credentials from this machine.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"check_auth","description":"Check current Optibot authentication status. Shows whether credentials are configured via environment variable or config file, and the active organization (if any).","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"create_api_key","description":"Create a new Optibot API key for CI/CD or automation. The key is only shown once — copy it immediately.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"name":{"type":"string","description":"Name for the API key (e.g., \"ci-github-actions\", \"jenkins-pipeline\")"}},"required":["name"]},"execution":{"taskSupport":"forbidden"}},{"name":"list_api_keys","description":"List all Optibot API keys associated with your account.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"delete_api_key","description":"Delete an Optibot API key by ID. Use list_api_keys to find the ID.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"type":"string","description":"ID of the API key to delete"}},"required":["id"]},"execution":{"taskSupport":"forbidden"}},{"name":"list_organizations","description":"List all Optibot organizations you belong to. The currently active organization is marked with \"*\". Use switch_organization to change it.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"get_current_organization","description":"Show the currently active Optibot organization and your role in it. Read from the JWT organizationId claim (the authoritative source).","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"switch_organization","description":"Switch the active Optibot organization. Rescopes your token so subsequent tool calls act as that organization. Accept either organizationId or name — if multiple orgs share a name, provide organizationId instead. Token is replaced in ~/.optibot/config.json.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"organizationId":{"description":"Organization id to switch to. Provide either organizationId or name.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"description":"Organization name (or displayName) to switch to. Used only when organizationId is not provided. Must match exactly one organization.","type":"string"}}},"execution":{"taskSupport":"forbidden"}},{"name":"get_status","description":"Show full Optibot status: authentication method, active organization, and review quota. Mirrors `optibot status` from the CLI.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"trigger_security_scan","description":"Trigger an AI security scan on a repository in the active organization. Blocks until the scan completes (or the timeout is reached, in which case it returns a \"still_running\" handoff). Streams live progress events. Accepts either repositoryId or name.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"repositoryId":{"description":"Repository id to scan. Provide either repositoryId or name.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"description":"Repository name or fullName to scan. Used only when repositoryId is not provided.","type":"string"},"modelTier":{"description":"Model tier: low (cheapest), medium, high (most thorough). Server default if omitted.","type":"string","enum":["low","medium","high"]},"maxBudgetUSD":{"description":"Max budget per scan in USD (0.50–500).","type":"number","minimum":0.5,"maximum":500},"postAsIssue":{"description":"If true, open the scan report as a GitHub/GitLab issue on completion.","type":"boolean"},"timeoutSeconds":{"description":"How long to wait for completion before returning a still_running handoff. Default 300.","type":"integer","minimum":30,"maximum":1800}}},"execution":{"taskSupport":"forbidden"}},{"name":"list_security_scans","description":"List recent security scans for the active organization. Optionally filter by repository. Paginated.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"repositoryId":{"description":"Filter by repository id.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"description":"Filter by repository name or fullName.","type":"string"},"page":{"description":"Page number (default 1).","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"pageSize":{"description":"Results per page (default 5, max 50).","type":"integer","minimum":1,"maximum":50}}},"execution":{"taskSupport":"forbidden"}},{"name":"get_security_scan","description":"Fetch the full markdown report and metadata for a specific security scan by id. The backend has no by-id endpoint, so this pages through recent scans up to a reasonable cap.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"scanId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Scan id (from list_security_scans)."}},"required":["scanId"]},"execution":{"taskSupport":"forbidden"}},{"name":"get_security_usage","description":"Show current-month token usage and cost for security scans on the active organization.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"get_security_pricing","description":"Show per-tier pricing and markup multiplier for security scans.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"list_scannable_repos","description":"List repositories available to scan in the active organization. Use these ids/names when calling trigger_security_scan.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"get_security_config","description":"Show the scheduled-scan configuration (schedule, enabled repos, budget, tier) for the active organization.","inputSchema":{"type":"object","properties":{}},"execution":{"taskSupport":"forbidden"}},{"name":"update_security_config","description":"Update the scheduled-scan configuration for the active organization. Only specified fields are changed; unspecified fields keep their current value. When schedule is \"custom\", customCron is required.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"enabled":{"description":"Enable or disable scheduled scans.","type":"boolean"},"schedule":{"description":"Scan frequency. If \"custom\", provide customCron.","type":"string","enum":["weekly","monthly","quarterly","custom"]},"customCron":{"description":"Cron expression (required when schedule=custom).","type":"string"},"modelTier":{"description":"Model tier for scheduled scans.","type":"string","enum":["low","medium","high"]},"maxBudgetUSD":{"description":"Max budget per scheduled scan.","type":"number","minimum":0.5,"maximum":500},"repositoryIds":{"description":"List of repository ids to include in scheduled scans. Replaces the existing list.","type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"postAsIssue":{"description":"Whether to open scan reports as repository issues.","type":"boolean"}}},"execution":{"taskSupport":"forbidden"}},{"name":"setup_ci","description":"Set up Optibot for CI/CD: mints a long-lived API key bound to the currently active organization and returns the export line ready to paste into the user's CI secret store. Use this for any \"set up Optibot in CI\" / GitHub Actions / GitLab CI / agentic-coder question.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"name":{"description":"Name for the API key. Default: \"ci\".","type":"string"}}},"execution":{"taskSupport":"forbidden"}}]},"jsonrpc":"2.0","id":2}