mcp: advertise a capability if and only if added (#93)
If tools are added to a Server when Run is called, it will send toolCapabilities to the client. Otherwise it won't. Ditto for prompts and resources. For #56.
This commit is contained in:
parent
bfa5e30cd1
commit
b4febf129b
1 changed files with 118 additions and 16 deletions
|
|
@ -66,6 +66,9 @@ func (s *featureSet[T]) get(uid string) (T, bool) {
|
|||
return t, ok
|
||||
}
|
||||
|
||||
// len returns the number of features in the set.
|
||||
func (s *featureSet[T]) len() int { return len(s.features) }
|
||||
|
||||
// all returns an iterator over of all the features in the set
|
||||
// sorted by unique ID.
|
||||
func (s *featureSet[T]) all() iter.Seq[T] {
|
||||
|
|
|
|||
Loading…
Reference in a new issue