> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gateway Method Descriptor • AI Agent SDK

> GatewayMethodDescriptor: Declarative authorisation descriptor for one gateway method.

# GatewayMethodDescriptor

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Declarative authorisation descriptor for one gateway method.

A descriptor states — once, next to the protocol it guards — *what scope a
caller must hold* to invoke `name`. The dispatcher resolves the required
scope from the registry instead of scattering `_require_scope` /
`_client_has_scope` calls per endpoint, so a newly added method is
**closed until explicitly classified** rather than reachable by omission.

Attributes:
name: The method / route / message-type identifier (e.g.
`"agent.message"`, `"channels.control"`).
required\_scope: The baseline scope required to invoke the method.
owner: Who declared the method (`"core"`, a plugin name, ...). Purely
informational; helps auditing a growing control surface.
since: Optional version/date the method was classified.
escalate\_fields: Optional per-payload-field escalation. Maps a param
field name to the stricter scope demanded when that field is
present. Fields not listed here are treated as *unknown/structural*
and escalate to :attr:`escalate_unknown_scope` (fail closed) when
:attr:`strict_fields` is True.
strict\_fields: When True, any payload field not in `escalate_fields`
(and not in `safe_fields`) escalates to
:attr:`escalate_unknown_scope`. Defaults to False so today's
behaviour (no field-level derivation) is preserved unless opted in.
safe\_fields: Field names that never escalate — read-only / benign
params. Only consulted when `strict_fields` is True.
escalate\_unknown\_scope: Scope demanded for unknown structural fields
under `strict_fields`. Defaults to `ADMIN` (fail closed).

## Properties

<ResponseField name="name" type="str">
  No description available.
</ResponseField>

<ResponseField name="required_scope" type="OperatorScope">
  No description available.
</ResponseField>

<ResponseField name="owner" type="str">
  No description available.
</ResponseField>

<ResponseField name="since" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="escalate_fields" type="Dict[str, OperatorScope]">
  No description available.
</ResponseField>

<ResponseField name="strict_fields" type="bool">
  No description available.
</ResponseField>

<ResponseField name="safe_fields" type="Set[str]">
  No description available.
</ResponseField>

<ResponseField name="escalate_unknown_scope" type="OperatorScope">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="resolve()" icon="function" href="../functions/GatewayMethodDescriptor-resolve">
    Resolve the effective required scope for a call with `params`.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L5525">
  `praisonaiagents/gateway/protocols.py` at line 5525
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Gateway Feature" icon="tower-broadcast" href="/docs/docs/features/gateway" />
</CardGroup>
