MCP client working

This commit is contained in:
Cyber MacGeddon 2025-07-07 22:41:11 +01:00
parent e7224e2b14
commit 9b952bae10
2 changed files with 9 additions and 2 deletions

View file

@ -81,7 +81,7 @@ class ToolService(FlowProcessor):
)
__class__.tool_invocation_metric.labels(
id = self.id, flow = self.flow, name = request.name,
id = self.id, flow = flow.name, name = request.name,
).inc()
except TooManyRequests as e:

View file

@ -44,10 +44,17 @@ class Service(ToolService):
)
print(result)
if result.structuredContent:
return result.structuredContent
elif hasattr(result, "content"):
return "".join([
x.text
for x in result.content
])
else:
return result.unstructuredContent
return "No content"
except BaseExceptionGroup as e:
for child in e.exceptions: