From 59cab3346ea70ae85bbc76e7f2c56a4dc74837b0 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Jul 2026 16:26:54 +0800 Subject: [PATCH] docs(get_connection): point to SHS, fetch_url, and the full field set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Old description was thin and only mentioned yarn_rm_url / auth_type as the things to look up. That was written before we added history_server_url and url_allowlist, and before fetch_url and list_applications existed. New description explicitly enumerates the connection fields an agent is most likely to need (yarn_rm_url, history_server_url, url_allowlist, auth_*, master/deploy_mode/spark_conf) and names the tools that consume them (get_external_*, fetch_url, list_applications, prepare_submit_job) so the LLM knows to call get_connection first when it needs any of those. Also adds a security note that the response includes secrets (auth_password, auth_keytab) — the previous description didn't warn about this. Tests: 398 passed, no test changes (description text is not asserted). Co-Authored-By: Claude Fable 5 --- spark_executor/server.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/spark_executor/server.py b/spark_executor/server.py index dc7510d..377e66f 100644 --- a/spark_executor/server.py +++ b/spark_executor/server.py @@ -426,10 +426,17 @@ def _list_connections(_req: EmptyRequest = EmptyRequest()): operation_id="get_connection", summary="Get a single connection by name", description=( - "Return the Connection record, or 404 if not found. Useful to " - "verify a connection was saved correctly, or to inspect the " - "resolved yarn_rm_url / auth_type before submitting a job or " - "calling one of the get_external_* tools." + "Return the full Connection record, or 404 if not found. **Call this " + "whenever you need any cluster-level config** — common lookups: " + "yarn_rm_url (YARN RM endpoint), history_server_url (Spark History " + "Server), url_allowlist (which hosts fetch_url may access), " + "auth_type / auth_user / ssl_verify (for any YARN REST or HTTP call), " + "master / deploy_mode / spark_conf (for prepare_submit_job).\n\n" + "The response is a full Pydantic model dump — all fields including " + "secrets (auth_password, auth_keytab). Treat it as sensitive. " + "Useful to verify a connection was saved correctly, or to discover " + "the right endpoint to call before invoking get_external_*, " + "fetch_url, or list_applications." ), ) def _get_connection(req: ConnectionNameRequest):