MCP PHP SDK

ModelHint implements JsonSerializable

Hints to use for model selection.

Keys not declared here are currently left unspecified by the spec and are up to the client to interpret.

Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Table of Contents

Interfaces

JsonSerializable

Properties

$name  : string|null

Methods

__construct()  : mixed
jsonSerialize()  : array{name: string}|array{}

Properties

$name read-only

public string|null $name = null

Methods

__construct()

public __construct([string|null $name = null ]) : mixed
Parameters
$name : string|null = null

A hint for a model name.

The client SHOULD treat this as a substring of a model name; for example:

  • claude-3-5-sonnet should match claude-3-5-sonnet-20241022
  • sonnet should match claude-3-5-sonnet-20241022, claude-3-sonnet-20240229, etc.
  • claude should match any Claude model

The client MAY also map the string to a different provider's model name or a different model family, as long as it fills a similar niche; for example:

  • gemini-1.5-flash could match claude-3-haiku-20240307

jsonSerialize()

public jsonSerialize() : array{name: string}|array{}
Return values
array{name: string}|array{}

        
On this page

Search results