Skip to main content
Glama
Phocinae

phocinae-mcp

Official

命令审批门

gate

Determines whether a shell command may execute, returning allow, deny, or ask with a reason and escalating ambiguous cases for human confirmation.

Instructions

何时使用:需要判定一条 shell 命令能否执行时——代码代理要跑命令、批处理要校验、人工要复核灰区命令,都用 gate 逐条判定。何时不使用:不要用它判定非 shell 操作(文件读写、HTTP 调用);不要把多条命令拼成一条字符串绕过判定;宿主已有内置审批机制时不要重复叠加。返回 decision ∈ allow|deny|ask 与 layer/reason;ask 时结果携带人工确认交互(MCP 2026-07-28 elicitation)或明示需人工复核;服务不可用 fail-closed 返回 deny。

Input Schema

NameRequiredDescriptionDefault
cwdNo命令执行工作目录(可选;默认服务器进程当前目录)
serverNo可选:覆盖服务地址(http://host:port,等价于 --server;上限 2048 字符)
commandYes待判定的 shell 命令(必填;上限 20000 字符)

Output Schema

NameRequiredDescriptionDefault
cwdNo
noulNo
toolNo
errorNo
layerYes
modelNo
scoreNo
engineNo
reasonYes
serverNo
statusNo
commandYes
decisionYes
confidenceNo
noul_stateNo
fail_closedNo
human_actionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.6

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it declares the return shape (decision ∈ allow|deny|ask plus layer/reason), states that ask triggers a human-confirmation interaction (MCP elicitation) or explicit manual review, and specifies fail-closed behaviour returning deny when the service is unavailable. Failure mode and human-in-the-loop semantics are exactly what an agent needs before wiring this into a pipeline.

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

Conciseness5/5

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

Front-loaded with the decision-critical '何时使用 / 何时不使用' labels, then return values and failure mode. Every clause carries information (scenario, exclusion, output shape, fail-closed) and there is no filler.

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?

Three parameters all documented, output schema present, no annotations needing compensation, and the description still adds decision semantics, human-review path, and fail-closed behaviour. Nothing an agent needs to call this correctly is missing.

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 coverage is 100%, so command/cwd/server are already fully documented in the schema, which sets the baseline at 3. The description only implicitly touches parameters via the 'don't concatenate multiple commands into one string' constraint; it adds no cwd or server-override semantics beyond the schema.

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?

Names a specific verb + resource: judging whether a single shell command may execute, and explicitly scopes out non-shell operations (file I/O, HTTP calls). An agent can tell this apart from the generic sibling names classify/route/score because the description pins the domain to shell-command gating.

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?

Opens with an explicit 'when to use' clause covering three concrete caller scenarios (coding agent about to run, batch validation, human grey-zone review) and follows with three explicit 'when not to use' exclusions, including the anti-pattern of concatenating commands to bypass judgement and stacking on an existing host approval mechanism.

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

Deploy Server

Other Tools