MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / Execute

Method Execute

go/engine/node/webfetch.go:95–108  ·  view source on GitHub ↗
(ctx context.Context, scope *engine.Scope)

Source from the content-addressed store, hash-verified

93 binding: binding,
94 toolDescription: toolDescription,
95 }
96}
97
98func (n *WebFetch) Outputs() map[string]workflowapi.DataType {
99 return engine.FilterEmitted(
100 map[string]workflowapi.DataType{webFetchOutID: workflowapi.String},
101 map[string]workflowapi.OutputBinding{webFetchOutID: n.binding},
102 )
103}
104
105func (n *WebFetch) Execute(ctx context.Context, scope *engine.Scope) (string, error) {
106 if n.url == nil {
107 return "", fmt.Errorf("web_fetch %s: no url expression", n.ID())
108 }
109 urlStr, err := expr.EvalString(*n.url, scope)
110 if err != nil {
111 return "", fmt.Errorf("web_fetch %s: url: %w", n.ID(), err)

Callers

nothing calls this directly

Calls 3

fetchMethod · 0.95
NextMethod · 0.80
IDMethod · 0.65

Tested by

no test coverage detected