Parent epic: #304
Problem
The tool source generator maps parameter types to JSON schema types, but silently falls back to "string" for any type it doesn't recognize. If someone adds a DateTime, enum, List<string>, or custom type as a tool parameter, the generator:
- Emits
"type": "string" in the schema — the LLM gets no useful format hint
- Generates
ParseArguments code that will likely fail at runtime with a cast/parse error
This compiles cleanly and tests pass until someone actually invokes the tool with that parameter.
Supported types today
string → "string"
int, long → "integer"
float, double → "number"
bool → "boolean"
- Nullable variants of the above
Everything else silently becomes "string".
Proposed fix
Add a diagnostic to NetclawToolGenerator that emits a warning when a TParams constructor parameter uses an unsupported type:
NCLW2002: Tool parameter type is not supported by schema generator
- Trigger: TParams record constructor parameter is not one of the supported primitive types
- Severity: Warning
- Fix: Use a supported type, or add support for the new type in the generator
This is a generator enhancement, not a separate analyzer — the diagnostic should be emitted during source generation since the generator already inspects parameter types.
Acceptance criteria
Parent epic: #304
Problem
The tool source generator maps parameter types to JSON schema types, but silently falls back to
"string"for any type it doesn't recognize. If someone adds aDateTime,enum,List<string>, or custom type as a tool parameter, the generator:"type": "string"in the schema — the LLM gets no useful format hintParseArgumentscode that will likely fail at runtime with a cast/parse errorThis compiles cleanly and tests pass until someone actually invokes the tool with that parameter.
Supported types today
string→"string"int,long→"integer"float,double→"number"bool→"boolean"Everything else silently becomes
"string".Proposed fix
Add a diagnostic to
NetclawToolGeneratorthat emits a warning when a TParams constructor parameter uses an unsupported type:NCLW2002: Tool parameter type is not supported by schema generator
This is a generator enhancement, not a separate analyzer — the diagnostic should be emitted during source generation since the generator already inspects parameter types.
Acceptance criteria