forked from metoro-io/mcp-golang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresource_response_types.go
38 lines (31 loc) · 1.67 KB
/
resource_response_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package mcp_golang
type readResourceRequestParams struct {
// The URI of the resource to read. The URI can use any protocol; it is up to the
// server how to interpret it.
Uri string `json:"uri" yaml:"uri" mapstructure:"uri"`
}
// The server's response to a resources/list request from the client.
type ListResourcesResponse struct {
// Resources corresponds to the JSON schema field "resources".
Resources []*ResourceSchema `json:"resources" yaml:"resources" mapstructure:"resources"`
// NextCursor is a cursor for pagination. If not nil, there are more resources available.
NextCursor *string `json:"nextCursor,omitempty" yaml:"nextCursor,omitempty" mapstructure:"nextCursor,omitempty"`
}
// A known resource that the server is capable of reading.
type ResourceSchema struct {
// Annotations corresponds to the JSON schema field "annotations".
Annotations *Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty" mapstructure:"annotations,omitempty"`
// A description of what this resource represents.
//
// This can be used by clients to improve the LLM's understanding of available
// resources. It can be thought of like a "hint" to the model.
Description *string `json:"description,omitempty" yaml:"description,omitempty" mapstructure:"description,omitempty"`
// The MIME type of this resource, if known.
MimeType *string `json:"mimeType,omitempty" yaml:"mimeType,omitempty" mapstructure:"mimeType,omitempty"`
// A human-readable name for this resource.
//
// This can be used by clients to populate UI elements.
Name string `json:"name" yaml:"name" mapstructure:"name"`
// The URI of this resource.
Uri string `json:"uri" yaml:"uri" mapstructure:"uri"`
}