Skip to main content
Glama

实时权限快照

gwl_get_permissions
Read-onlyIdempotent

Retrieve the permissions resolved server-side for the current request, including user level, permission nodes, and class identity, to verify effective access before managing GWL resources.

Instructions

返回本次请求实时解析出的权限(服务端每次请求重算,不信任任何客户端声明)。 字段:userid、real_level、level、context(apikey 路径恒为 null)、nodes(5 段权限节点串列表)、class_id 与 class_role(当前组类身份)。 想以某个组类身份操作,用环境变量 GWL_ORG_CLASS(或请求级 X-Org-Class 语义),不属于该组类时会被静默忽略。

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": "gwl_get_permissions"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description still adds real behavioral context: results are recomputed server-side per request (so they must not be cached or trusted from a prior call), the context field is always null on the apikey path, and an unmatched group-class identity is silently ignored rather than erroring — a failure mode worth knowing.

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

Conciseness4/5

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

Front-loaded with the distinguishing semantic (real-time server-side resolution, no client trust), followed by field glosses and the identity override. The field enumeration partly duplicates the existing output schema, but the annotations attached to nodes (5-segment strings) and context (always null on apikey path) carry meaning the schema alone does not.

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?

An output schema exists, so return values need not be re-explained in full, and the description wisely spends its budget on behavior and identity semantics instead. For a zero-parameter read tool this is close to complete; it says nothing about auth requirements or whether calling it has any side effect on the resolved identity.

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?

Zero declared parameters, so the baseline is 4 and the schema needs no compensation. The description goes slightly beyond the schema by documenting an out-of-band input channel (GWL_ORG_CLASS env var / X-Org-Class) that changes the result, which the empty schema cannot express.

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?

States a specific verb and resource (return the permissions resolved for this request) and pins down the defining semantics: the server recomputes every request and trusts no client claim. That separates it in spirit from a static profile lookup such as gwl_get_me, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Guidance is present but narrow: it explains how to operate under a specific group-class identity via GWL_ORG_CLASS or the X-Org-Class semantic, and that non-membership is silently ignored. It never says when an agent should call this versus gwl_get_me or gwl_get_class, so the choice between identity/permission lookups is left to inference.

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