Skip to main content
Glama

Get the working directory's default services

komuta_get_local_service_context
Read-only

Get an instruction for YOU (the agent) to read the default services for the user's current working directory yourself, from the local .komuta/config.json (exact format {"projects":{"{project_id}":{"name":"{project_name}","services":[{"id":"{service_id}","name":"{service_name}"}]}}} — a map of project id → { name, services: [{ id, name }] }, since one directory may hold several projects and several services per project, typically the same app deployed as prod + staging/dev; any other shape is treated as no config; looked up from the directory upward, like git finds .git). The file's own "name" fields already give you the saved project/service NAMEs — you do NOT need a fresh komuta_list_services/komuta_list_projects call just to label what you found; only re-resolve by name if you need to confirm the entry is still valid. Call this as the very first action of a new conversation (the server's STARTUP LOCAL CONTEXT rule, mandatory) — silently, before responding to anything else — and it's also fine to call it again later in the same conversation any time a service operation needs a service and the user did NOT name one ('my service', 'show my logs', 'is it healthy'), or a previously loaded entry might be stale. If EXACTLY ONE service is saved, use its ids directly for the follow-up service tools instead of asking the user. If SEVERAL are saved, present their saved NAMEs in plain words and ask the user WHICH one they mean — never auto-pick among them — but only at the point a step actually needs one, not at startup. If none is found, fall back to the normal by-name resolution (komuta_list_services) — no need to save anything yourself: successful service calls in this directory trigger their own auto-save instruction, which you follow and then relay by name to the user. Returns: { instruction } — a literal instruction string telling you how to read and interpret the file yourself. Show user: the startup call itself is silent — never announce that you checked or what it found. Only when a later step actually needs a service: if exactly one entry, that this directory's default service is being used, by NAME only; if several, the list of saved service NAMEs and the question which one they mean; if none, nothing (silently fall back to by-name resolution). 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: the project/service ids you read from the file; the file path and JSON shape themselves.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "komuta_get_local_service_context"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: it discloses the exact file format, the upward directory lookup semantics (like git finding .git), the tolerance rule (any other shape is treated as no config), the return shape `{ instruction }`, and that auto-save is triggered by successful service calls rather than by this tool. It is consistent with readOnlyHint=true — it only reads a local file and never writes.

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

Conciseness3/5

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

The lede is front-loaded and well ordered, but the text is a sprawling run-on: the JSON shape is stated twice (raw literal plus a prose restatement), and there are long parentheticals. Several rules genuinely earn their place, yet the duplication and density cost it clarity.

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

Completeness5/5

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

With no parameters and no output schema, the description carries the full burden and does: it explains the return value, how to interpret it, and exactly what to surface to the user versus keep silent in each of the zero/one/many-entry cases. Nothing needed to call it correctly is missing.

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

Parameters4/5

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

The tool takes zero parameters, so there is nothing for the description to disambiguate beyond the schema baseline. The description does not invent or misdescribe inputs, but it also adds no parameter-level meaning because none exists.

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

Purpose5/5

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

States a specific verb+resource (get local service context) and immediately clarifies the non-obvious mechanics: it returns an instruction string telling the agent to read `.komuta/config.json` itself rather than the server resolving the services. It also differentiates from siblings by name, explicitly noting this replaces a fresh komuta_list_services/komuta_list_projects call for labelling saved entries.

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?

Gives exhaustive when-to-use guidance: as the first mandatory action of a new conversation, and optionally later when a service operation needs a service the user did not name or an entry may be stale. It also names the fallback path (komuta_list_services) when nothing is found, and states the counter-case where re-resolution is unnecessary.

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