Skip to content

Strange Code #130

@kaipiyann

Description

@kaipiyann

Working on the SDK I read this method in BlobResourceContents.php and wonder if there is not a problem here :

    public function jsonSerialize(): array
    {
        return [
            'blob' => $this->blob,
            ...$this->jsonSerialize(),
        ];
    }

https://github.com/modelcontextprotocol/php-sdk/blob/757b959bfd2a0842c6af49e5d546e45426aea686/src/Schema/Content/BlobResourceContents.php#L78C1-L84C6

In TextResourceContents.php the method call parent :

    public function jsonSerialize(): array
    {
        return [
            'blob' => $this->blob,
            ...parent::jsonSerialize(),
        ];
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingServerIssues & PRs related to the Server component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions