MCPcopy Index your code
hub / github.com/coder/coder / parseMCPServerConfigID

Function parseMCPServerConfigID

coderd/mcp.go:1233–1243  ·  view source on GitHub ↗
(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

1231}
1232
1233func parseMCPServerConfigID(rw http.ResponseWriter, r *http.Request) (uuid.UUID, bool) {
1234 mcpServerID, err := uuid.Parse(chi.URLParam(r, "mcpServer"))
1235 if err != nil {
1236 httpapi.Write(r.Context(), rw, http.StatusBadRequest, codersdk.Response{
1237 Message: "Invalid MCP server config ID.",
1238 Detail: err.Error(),
1239 })
1240 return uuid.Nil, false
1241 }
1242 return mcpServerID, true
1243}
1244
1245// convertMCPServerConfig converts a database MCP server config to the
1246// SDK type. Secrets are never returned; only has_* booleans are set.

Callers 6

getMCPServerConfigMethod · 0.85
updateMCPServerConfigMethod · 0.85
deleteMCPServerConfigMethod · 0.85

Calls 4

WriteFunction · 0.92
ParseMethod · 0.65
ContextMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected