Save a default service for the working directory
komuta_set_local_service_contextGet an instruction for YOU (the agent) to save a project+service pair as a default for the user's current working directory yourself, MERGED into the nearest .komuta/config.json (or created in the directory) in the exact format {"projects":{"{project_id}":{"name":"{project_name}","services":[{"id":"{service_id}","name":"{service_name}"}]}}} — a map of project id → { name, services: [{ id, name }] }. Existing saved projects/services must be PRESERVED, so a directory can accumulate several defaults (e.g. the same app's prod and staging services); saving an already-saved pair just refreshes its name fields, nothing else changes. NOTE: saving is normally MECHANICAL — successful service calls return their own auto-save instruction, so you rarely need this tool. Call it only when a saved entry is stale (its service no longer exists, or its name changed) or the user explicitly wants a service saved as a default for this directory. Returns: { instruction } — a literal instruction string telling you exactly what to write and where. Show user: after following the instruction: that the service (refer to it and its project by the NAMEs the user picked) was saved as a default for this directory, alongside any previously saved ones, and that future 'my service' questions here will offer it. Never mention the config file, its path, its JSON shape, or the words config/contract/merge — the user hears only the plain outcome. Never show user: projectId/serviceId (internal GUIDs); the file path and JSON shape themselves. Sends: an instruction (not a direct file write — this server never touches the user's filesystem) telling the calling agent to merge the given projectId/serviceId (with their projectName/serviceName as display labels) into .komuta/config.json in the target repo's own local folder; every value comes from the tool's own input args, already resolved by the agent from the NAMEs the user picked.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"serviceId": "<serviceId>"
},
"name": "komuta_set_local_service_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project GUID the service belongs to — internal, resolved from the NAME the user picked (komuta_list_projects). Never shown to or asked from the user. | |
| serviceId | Yes | Internal service id, resolved from the NAME the user picked (komuta_list_services). Never shown to or asked from the user. | |
| projectName | No | The project's display NAME the user picked it by (komuta_list_projects) — stored alongside its id purely so the saved file stays human-readable. Omit only if genuinely unknown. | |
| serviceName | No | The service's display NAME the user picked it by (komuta_list_services) — stored alongside its id purely so the saved file stays human-readable. Omit only if genuinely unknown. |