Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 14:45 UTC
docs: update documentation for new changelog entries
github-actions[bot] committed
Aug 27, 2026 at 18:08 UTC
588186613e9889e6ba0efa90fda1b9012dc78690
1 file changed
+30
docs/content/docs/providers/custom-providers/typescript.mdx
+30
@@ -164,6 +164,36 @@ export class MyAgentProvider extends BaseAgenticProvider<AgentToolkit, AgentTool
164
}
165
```
166
167
+## Support strict tool schemas
168
+
169
+If your platform supports OpenAI-compatible strict tool schemas, use `toStrictJsonSchema()` to normalize each tool's input schema. The result keeps optional parameters available by making them required and nullable. Before execution, use `omitNullToolArguments()` to remove a `null` that represents an omitted optional parameter while preserving fields whose original schema accepts `null`.
170
+
171
+```typescript
172
+// @noErrors
173
+import { omitNullToolArguments, toStrictJsonSchema } from '@composio/core';
174
+
175
+const originalSchema = {
176
+ type: 'object',
177
+ properties: {
178
+ query: { type: 'string' },
179
+ limit: { type: 'integer' },
180
+ },
181
+ required: ['query'],
182
+};
183
+
184
+const strict = toStrictJsonSchema(originalSchema);
185
+
186
+if (strict.unsupported.length === 0) {
187
+ // Send strict.schema to the model with strict mode enabled.
188
+ const modelArguments = { query: 'open pull requests', limit: null };
189
+ const toolArguments = omitNullToolArguments(modelArguments, strict.source);
190
+
191
+ console.log(toolArguments); // { query: 'open pull requests' }
192
+}
193
+```
194
+
195
+When `strict.unsupported` isn't empty, send the original schema without strict mode and log the reported paths. Strict mode can't represent arbitrary-key objects, unsupported intersections, tuple-style arrays, or unresolved references without narrowing the tool's accepted input.
196
+
197
## Use your provider
198
199
Pass an instance to `Composio` via the `provider` option. Every tool you fetch comes back in your custom format.