Skip to content

Commit 05a72b5

Browse files
authored
feat: add --version flag (#26)
1 parent ff50e3e commit 05a72b5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/mcp_server_datahub/__main__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,20 @@ async def on_call_tool(
3838
"type": context.type,
3939
"method": context.method,
4040
"duration_seconds": timer.elapsed_seconds(),
41+
"tool_result_is_error": result.isError,
42+
"tool_result_length": sum(
43+
len(block.text)
44+
for block in result.content
45+
if isinstance(block, mt.TextContent)
46+
),
4147
},
4248
)
4349

4450
return result
4551

4652

4753
@click.command()
54+
@click.version_option(version=__version__)
4855
@click.option(
4956
"--transport",
5057
type=click.Choice(["stdio", "sse", "http"]),

0 commit comments

Comments
 (0)