UiResourcePermissions implements JsonSerializable
FinalYes
Sandbox permissions that an MCP App resource requests from the host.
Per spec each requested permission is a presence marker (serialized as }),
so the wire shape is e.g. {"geolocation": }}, not {"geolocation": true}.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $camera : bool
- $clipboardWrite : bool
- $geolocation : bool
- $microphone : bool
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string, stdClass>
Properties
$camera read-only
public
bool
$camera
= false
$clipboardWrite read-only
public
bool
$clipboardWrite
= false
$geolocation read-only
public
bool
$geolocation
= false
$microphone read-only
public
bool
$microphone
= false
Methods
__construct()
public
__construct([bool $camera = false ][, bool $microphone = false ][, bool $geolocation = false ][, bool $clipboardWrite = false ]) : mixed
Parameters
- $camera : bool = false
- $microphone : bool = false
- $geolocation : bool = false
- $clipboardWrite : bool = false
fromArray()
public
static fromArray(UiResourcePermissionsData $data) : self
Parameters
- $data : UiResourcePermissionsData
Return values
selfjsonSerialize()
public
jsonSerialize() : array<string, stdClass>