gabotorresruiz commented on code in PR #45084:
URL: https://github.com/apache/superset/pull/45084#discussion_r4224477744


##########
superset/mcp_service/server.py:
##########
@@ -549,10 +559,7 @@ def _serializer(tools: Sequence[Any]) -> list[dict[str, 
Any]]:
         results = _serialize_tools_without_output_schema(tools)
         for tool, data in zip(tools, results, strict=True):
             if desc := data.get("description"):
-                instructions = _request_instructions(tool)
-                data["description"] = _truncate_description(
-                    desc, max(0, max_desc - len(instructions))
-                )
+                data["description"] = _bounded_description(tool, desc, 
max_desc)

Review Comment:
   Not a blocker, and not a regression: I compared the search results against 
master and they are byte identical. But now that native mode does not deduct, 
is the deduction still earning anything here? With `include_schemas: True`, 
which is what `MCP_TOOL_SEARCH_CONFIG` ships, this serializer keeps 
`inputSchema`, so `list_datasets` sends its 267 characters of request 
instructions in full at `inputSchema.properties.request.description` and the 
same 267 come off the 300 budget, leaving the result advertised as `SQL 
datasets only.` with the `list_metrics`/`get_table` steer dropped. 
`_build_summary_serializer` has the same shape: the instructions go out in 
`parameters_hint` and are still deducted. At 300, 11 of the 75 search results 
are under 60 characters; at 250, eight come back empty. Your native argument 
reads like it applies verbatim to both search modes, and search is the enabled 
by default path, so it is the one most deployments see. Happy for this to be a 
follow up if you would r
 ather keep this PR scoped, or I might be missing what the deduction protects 
here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to