Class ToolArguments

java.lang.Object
dev.relism.flash.ext.mcp.ToolArguments

public final class ToolArguments extends Object
Typed accessor over a tools/call request's arguments object.

Wraps the already-parsed JsonNode directly — no POJO databinding, no reflection, no intermediate copy. Same spirit as QueryParams/PathParams in Flash core: a thin typed view over data that already exists in memory.


 public ToolResponse call(ToolArguments args) {
     String city = args.getString("city");
     int days    = args.getInt("days", 1);
     ...
 }
 
  • Method Details

    • has

      public boolean has(String name)
    • getString

      public String getString(String name)
    • getString

      public String getString(String name, String defaultValue)
    • getInt

      public int getInt(String name)
    • getInt

      public int getInt(String name, int defaultValue)
    • getLong

      public long getLong(String name)
    • getLong

      public long getLong(String name, long defaultValue)
    • getDouble

      public double getDouble(String name)
    • getDouble

      public double getDouble(String name, double defaultValue)
    • getBoolean

      public boolean getBoolean(String name)
    • getBoolean

      public boolean getBoolean(String name, boolean defaultValue)
    • raw

      public com.fasterxml.jackson.databind.JsonNode raw(String name)
      Escape hatch for nested/array arguments not covered by the typed accessors above.