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 }],
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions the tool is for 'help' and lists parameter defaults, it doesn't describe what kind of response to expect, whether it's a one-time answer or ongoing conversation, rate limits, authentication needs, or error handling. The description provides minimal behavioral context beyond basic parameter information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences. The first sentence states the purpose clearly, and the second provides parameter context. There's no wasted text, though the parameter listing could be more integrated rather than appearing as a separate bullet-like section.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what format the help response will take, whether it's conversational or single-answer, how to interpret different expert_type selections, or what happens when parameters conflict. The description leaves too many behavioral questions unanswered for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents all 6 parameters. The description adds only one piece of semantic information: 'Avoid changing temperature and top_p together.' This provides marginal value beyond what's in the schema, meeting the baseline expectation when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Ask NVIDIA USDCode for help' with specific domains listed (Isaac Sim scripting, USD, Python/API tips). This provides a clear verb+resource combination. However, since there are no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or contextual constraints. The only usage-related information is a technical warning about avoiding changing temperature and top_p together, which doesn't address the broader 'when to use' question.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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