(context.Context)
| 605 | } |
| 606 | |
| 607 | func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error) { |
| 608 | return []tools.Tool{ |
| 609 | { |
| 610 | Name: ToolNameFetch, |
| 611 | Category: "fetch", |
| 612 | Description: "Fetch content from one or more HTTP/HTTPS URLs. Returns the response body and metadata.", |
| 613 | Parameters: map[string]any{ |
| 614 | "type": "object", |
| 615 | "properties": map[string]any{ |
| 616 | "urls": map[string]any{ |
| 617 | "type": "array", |
| 618 | "items": map[string]any{ |
| 619 | "type": "string", |
| 620 | }, |
| 621 | "description": "Array of URLs to fetch", |
| 622 | "minItems": 1, |
| 623 | }, |
| 624 | "format": map[string]any{ |
| 625 | "type": "string", |
| 626 | "description": "The format to return the content in (text, markdown, or html)", |
| 627 | "enum": []string{"text", "markdown", "html"}, |
| 628 | }, |
| 629 | "timeout": map[string]any{ |
| 630 | "type": "integer", |
| 631 | "description": "Request timeout in seconds (default: 30)", |
| 632 | "minimum": 1, |
| 633 | "maximum": 300, |
| 634 | }, |
| 635 | }, |
| 636 | "required": []string{"urls", "format"}, |
| 637 | }, |
| 638 | OutputSchema: tools.MustSchemaFor[string](), |
| 639 | Handler: tools.NewHandler(t.handler.CallTool), |
| 640 | Annotations: tools.ToolAnnotations{ |
| 641 | Title: "Fetch URLs", |
| 642 | }, |
| 643 | }, |
| 644 | }, nil |
| 645 | } |
nothing calls this directly
no test coverage detected