ServerContext
class ServerContext
Properties
| Resource|null | $resolvedResource | The selected resource reused when adding response cache hints. |
|
| Request|null | $resolvedResourceRequest | The invocation request used to resolve that resource's cache hints. |
Methods
Create the context for a server message.
Resolve the tools eligible for registration.
Resolve the resources without URI templates.
Resolve the resources with URI templates.
Resolve the prompts eligible for registration.
Get the page size within the configured limit.
Determine whether the server advertises a capability.
Details
at line 37
__construct(array $supportedProtocolVersions, array $serverCapabilities, Implementation $implementation, string $instructions, int $maxPaginationLength, int $defaultPaginationLength, array $tools, array $resources, array $prompts)
Create the context for a server message.
at line 55
Collection
tools()
Resolve the tools eligible for registration.
at line 98
Collection
resources()
Resolve the resources without URI templates.
at line 112
Collection
resourceTemplates()
Resolve the resources with URI templates.
at line 126
Collection
prompts()
Resolve the prompts eligible for registration.
at line 137
int
perPage(int|null $requestedPerPage = null)
Get the page size within the configured limit.
at line 145
bool
hasCapability(string $capability)
Determine whether the server advertises a capability.