Skip to main content
Glama

Save a default service for the working directory

komuta_set_local_service_context
Idempotent

Get 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

NameRequiredDescriptionDefault
projectIdYesProject GUID the service belongs to — internal, resolved from the NAME the user picked (komuta_list_projects). Never shown to or asked from the user.
serviceIdYesInternal service id, resolved from the NAME the user picked (komuta_list_services). Never shown to or asked from the user.
projectNameNoThe 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.
serviceNameNoThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavior beyond that: the server never touches the filesystem and instead returns an `{ instruction }` string, merging preserves existing projects/services, and re-saving an existing pair only refreshes its name fields. It loses a point for burying these facts in a long, repetitive narrative rather than stating them up front.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description repeats itself: it opens with the save-and-merge behavior, embeds the full JSON shape, then re-explains the same 'sends an instruction' point in a 'Sends:' section. The user-facing copy rules (what to say, what never to mention) consume several sentences without helping the agent invoke the tool correctly. It is not front-loaded, because the key 'rarely needed' caveat comes in the middle.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by describing the single returned `{ instruction }` value and what following it entails. Merge semantics, idempotency of re-saving, and the no-filesystem-write constraint are all covered. The remaining gap is verbosity rather than missing information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters, establishing a baseline of 3. The description confirms the values come from the resolved arguments and that projectId/serviceId are internal identifiers never shown to the user, and that the names are display labels preserved for readability. Those details largely restate the schema descriptions rather than adding syntax or format guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete verb and resource: save a project+service pair as a default for the current working directory by merging into the nearest `.komuta/config.json`. It also distinguishes itself from the read-side sibling implicitly (this is the save counterpart of komuta_get_local_service_context). The opening sentence is convoluted ('Get an instruction for YOU (the agent) to save ... yourself'), but the intent is still recoverable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says saving is normally mechanical because successful service calls return their own auto-save instruction, and names the two conditions that justify calling this tool: a stale saved entry, or an explicit user request. That is a rare, explicit when-to-use / when-not-to-use rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources