Skip to main content
Glama

get_usdcode_help

Get expert assistance for Isaac Sim scripting, USD workflows, and Python API usage from NVIDIA's USDCode AI assistant to solve 3D graphics and simulation development challenges.

Instructions

Ask NVIDIA USDCode for help (Isaac Sim scripting, USD, Python/API tips).

Parameters: temperature (0-1, default 0.1), top_p (<=1, default 1), max_tokens (1-2048, default 1024), expert_type (auto|knowledge|code|helperfunction; default auto), stream (boolean; default false). Avoid changing temperature and top_p together.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYesYour prompt or question
temperatureNoSampling temperature (0-1). Default: 0.1
top_pNoTop-p nucleus sampling mass (<=1). Default: 1
max_tokensNoMax tokens to generate (1-2048). Default: 1024
expert_typeNoExpert to use: auto, knowledge, code, or helperfunction. Default: auto
streamNoStream partial deltas via SSE. Default: false

Implementation Reference

  • Async handler function that destructures input parameters, initializes OpenAI client for NVIDIA API, constructs the chat completion request to the USDCode model, handles both streaming and non-streaming responses by accumulating or extracting the generated text, and returns it in the expected MCP format.
    async (params: any) => { const { question, temperature = 0.1, top_p = 1, max_tokens = 1024, expert_type = "auto", stream = false, } = params ?? {}; const client = new OpenAI({ baseURL: "https://integrate.api.nvidia.com/v1", apiKey, }); // Build common request payload const request = { model: NVIDIA_MODEL, messages: [{ role: "user", content: question }], temperature, top_p, max_tokens, expert_type, } as any; let text = ""; if (stream) { // Handle streaming by accumulating deltas into a single string const s = await (client.chat.completions.create as any)({ ...request, stream: true, }); for await (const chunk of s as any) { const delta = chunk?.choices?.[0]?.delta?.content ?? ""; if (delta) text += String(delta); } if (!text) text = "No streamed content returned by USDCode."; } else { const completion = await (client.chat.completions.create as any)(request); text = completion.choices?.[0]?.message?.content?.toString() ?? "No content returned by USDCode."; } return { content: [{ type: "text", text }], }; }
  • Zod schema defining the input parameters: question (required string), and optional parameters for temperature, top_p, max_tokens, expert_type (enum), and stream (boolean).
    { question: z.string().describe("Your prompt or question"), temperature: z .number() .optional() .describe("Sampling temperature (0-1). Default: 0.1"), top_p: z .number() .optional() .describe("Top-p nucleus sampling mass (<=1). Default: 1"), max_tokens: z .number() .int() .optional() .describe("Max tokens to generate (1-2048). Default: 1024"), expert_type: z .enum(["auto", "knowledge", "code", "helperfunction"]) // possible values per API .optional() .describe( "Expert to use: auto, knowledge, code, or helperfunction. Default: auto" ), stream: z .boolean() .optional() .describe("Stream partial deltas via SSE. Default: false"), },
  • src/server.ts:30-106 (registration)
    Registration of the 'get_usdcode_help' tool on the MCP server, including name, description, input schema, and handler function.
    server.tool( "get_usdcode_help", "Ask NVIDIA USDCode for help (Isaac Sim scripting, USD, Python/API tips).\n\nParameters: temperature (0-1, default 0.1), top_p (<=1, default 1), max_tokens (1-2048, default 1024), expert_type (auto|knowledge|code|helperfunction; default auto), stream (boolean; default false). Avoid changing temperature and top_p together.", { question: z.string().describe("Your prompt or question"), temperature: z .number() .optional() .describe("Sampling temperature (0-1). Default: 0.1"), top_p: z .number() .optional() .describe("Top-p nucleus sampling mass (<=1). Default: 1"), max_tokens: z .number() .int() .optional() .describe("Max tokens to generate (1-2048). Default: 1024"), expert_type: z .enum(["auto", "knowledge", "code", "helperfunction"]) // possible values per API .optional() .describe( "Expert to use: auto, knowledge, code, or helperfunction. Default: auto" ), stream: z .boolean() .optional() .describe("Stream partial deltas via SSE. Default: false"), }, async (params: any) => { const { question, temperature = 0.1, top_p = 1, max_tokens = 1024, expert_type = "auto", stream = false, } = params ?? {}; const client = new OpenAI({ baseURL: "https://integrate.api.nvidia.com/v1", apiKey, }); // Build common request payload const request = { model: NVIDIA_MODEL, messages: [{ role: "user", content: question }], temperature, top_p, max_tokens, expert_type, } as any; let text = ""; if (stream) { // Handle streaming by accumulating deltas into a single string const s = await (client.chat.completions.create as any)({ ...request, stream: true, }); for await (const chunk of s as any) { const delta = chunk?.choices?.[0]?.delta?.content ?? ""; if (delta) text += String(delta); } if (!text) text = "No streamed content returned by USDCode."; } else { const completion = await (client.chat.completions.create as any)(request); text = completion.choices?.[0]?.message?.content?.toString() ?? "No content returned by USDCode."; } return { content: [{ type: "text", text }], }; } );
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ishandotsh/nvidia-usdcode-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server