MCP PHP SDK

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
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Interfaces

JsonSerializable

Properties

$camera  : bool
$clipboardWrite  : bool
$geolocation  : bool
$microphone  : bool

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : array<string, stdClass>

Properties

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
self

jsonSerialize()

public jsonSerialize() : array<string, stdClass>
Return values
array<string, stdClass>
On this page

Search results