@tanstack/ai-gemini 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +131 -0
  3. package/dist/esm/gemini-adapter.d.ts +71 -0
  4. package/dist/esm/gemini-adapter.js +375 -0
  5. package/dist/esm/gemini-adapter.js.map +1 -0
  6. package/dist/esm/index.d.ts +6 -0
  7. package/dist/esm/index.js +7 -0
  8. package/dist/esm/index.js.map +1 -0
  9. package/dist/esm/message-types.d.ts +84 -0
  10. package/dist/esm/model-meta.d.ts +189 -0
  11. package/dist/esm/model-meta.js +43 -0
  12. package/dist/esm/model-meta.js.map +1 -0
  13. package/dist/esm/text/text-provider-options.d.ts +184 -0
  14. package/dist/esm/tools/code-execution-tool.d.ts +7 -0
  15. package/dist/esm/tools/code-execution-tool.js +9 -0
  16. package/dist/esm/tools/code-execution-tool.js.map +1 -0
  17. package/dist/esm/tools/computer-use-tool.d.ts +10 -0
  18. package/dist/esm/tools/computer-use-tool.js +13 -0
  19. package/dist/esm/tools/computer-use-tool.js.map +1 -0
  20. package/dist/esm/tools/file-search-tool.d.ts +7 -0
  21. package/dist/esm/tools/file-search-tool.js +10 -0
  22. package/dist/esm/tools/file-search-tool.js.map +1 -0
  23. package/dist/esm/tools/function-declaration-tool.d.ts +5 -0
  24. package/dist/esm/tools/google-maps-tool.d.ts +7 -0
  25. package/dist/esm/tools/google-maps-tool.js +10 -0
  26. package/dist/esm/tools/google-maps-tool.js.map +1 -0
  27. package/dist/esm/tools/google-search-retriveal-tool.d.ts +7 -0
  28. package/dist/esm/tools/google-search-retriveal-tool.js +10 -0
  29. package/dist/esm/tools/google-search-retriveal-tool.js.map +1 -0
  30. package/dist/esm/tools/google-search-tool.d.ts +7 -0
  31. package/dist/esm/tools/google-search-tool.js +10 -0
  32. package/dist/esm/tools/google-search-tool.js.map +1 -0
  33. package/dist/esm/tools/index.d.ts +9 -0
  34. package/dist/esm/tools/tool-converter.d.ts +22 -0
  35. package/dist/esm/tools/tool-converter.js +64 -0
  36. package/dist/esm/tools/tool-converter.js.map +1 -0
  37. package/dist/esm/tools/url-context-tool.d.ts +7 -0
  38. package/dist/esm/tools/url-context-tool.js +9 -0
  39. package/dist/esm/tools/url-context-tool.js.map +1 -0
  40. package/package.json +53 -0
  41. package/src/gemini-adapter.ts +577 -0
  42. package/src/index.ts +22 -0
  43. package/src/message-types.ts +125 -0
  44. package/src/model-meta.ts +887 -0
  45. package/src/text/text-provider-options.ts +246 -0
  46. package/src/tools/code-execution-tool.ts +17 -0
  47. package/src/tools/computer-use-tool.ts +25 -0
  48. package/src/tools/file-search-tool.ts +19 -0
  49. package/src/tools/function-declaration-tool.ts +34 -0
  50. package/src/tools/google-maps-tool.ts +19 -0
  51. package/src/tools/google-search-retriveal-tool.ts +21 -0
  52. package/src/tools/google-search-tool.ts +19 -0
  53. package/src/tools/index.ts +18 -0
  54. package/src/tools/tool-converter.ts +99 -0
  55. package/src/tools/url-context-tool.ts +17 -0
@@ -0,0 +1,246 @@
1
+ import type {
2
+ MediaResolution,
3
+ SafetySetting,
4
+ Schema,
5
+ ThinkingLevel,
6
+ ToolConfig,
7
+ } from '@google/genai'
8
+
9
+ export interface GeminiToolConfigOptions {
10
+ /**
11
+ * Tool configuration for any Tool specified in the request.
12
+ */
13
+ toolConfig?: ToolConfig
14
+ }
15
+
16
+ export interface GeminiSafetyOptions {
17
+ /**
18
+ * list of unique SafetySetting instances for blocking unsafe content.
19
+
20
+ This will be enforced on the GenerateContentRequest.contents and GenerateContentResponse.candidates. There should not be more than one setting for each SafetyCategory type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each SafetyCategory specified in the safetySettings. If there is no SafetySetting for a given SafetyCategory provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY are supported
21
+ */
22
+ safetySettings?: Array<SafetySetting>
23
+ }
24
+
25
+ export interface GeminiGenerationConfigOptions {
26
+ /**
27
+ * Configuration options for model generation and outputs.
28
+ */
29
+ generationConfig?: {
30
+ /**
31
+ * The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop_sequence. The stop sequence will not be included as part of the response.
32
+ */
33
+ stopSequences?: Array<string>
34
+ /**
35
+ * The requested modalities of the response. Represents the set of modalities that the model can return, and should be expected in the response. This is an exact match to the modalities of the response.
36
+
37
+ A model may have multiple combinations of supported modalities. If the requested modalities do not match any of the supported combinations, an error will be returned.
38
+ */
39
+ responseModalities?: Array<
40
+ 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO'
41
+ >
42
+ /**
43
+ * Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family)
44
+ */
45
+ candidateCount?: number
46
+ /**
47
+ * The maximum number of tokens to consider when sampling.
48
+
49
+ Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of topK most probable tokens. Models running with nucleus sampling don't allow topK setting.
50
+
51
+ Note: The default value varies by Model and is specified by theModel.top_p attribute returned from the getModel function. An empty topK attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting topK on requests.
52
+ */
53
+ topK?: number
54
+ /**
55
+ * Seed used in decoding. If not set, the request uses a randomly generated seed.
56
+ */
57
+ seed?: number
58
+ /**
59
+ * Presence penalty applied to the next token's logprobs if the token has already been seen in the response.
60
+
61
+ This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequencyPenalty for a penalty that increases with each use.
62
+
63
+ A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary.
64
+
65
+ A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary.
66
+ */
67
+ presencePenalty?: number
68
+ /**
69
+ * Frequency penalty applied to the next token's logprobs, multiplied by the number of times each token has been seen in the respponse so far.
70
+
71
+ A positive penalty will discourage the use of tokens that have already been used, proportional to the number of times the token has been used: The more a token is used, the more difficult it is for the model to use that token again increasing the vocabulary of responses.
72
+
73
+ Caution: A negative penalty will encourage the model to reuse tokens proportional to the number of times the token has been used. Small negative values will reduce the vocabulary of a response. Larger negative values will cause the model to start repeating a common token until it hits the maxOutputTokens limit.
74
+ */
75
+ frequencyPenalty?: number
76
+ /**
77
+ * If true, export the logprobs results in response.
78
+ */
79
+ responseLogprobs?: boolean
80
+
81
+ /**
82
+ * Only valid if responseLogprobs=True. This sets the number of top logprobs to return at each decoding step in the Candidate.logprobs_result. The number must be in the range of [0, 20].
83
+ */
84
+ logprobs?: number
85
+
86
+ /**
87
+ * Enables enhanced civic answers. It may not be available for all models.
88
+ */
89
+ enableEnhancedCivicAnswers?: boolean
90
+
91
+ /**
92
+ * The speech generation config.
93
+ */
94
+ speechConfig?: {
95
+ voiceConfig: {
96
+ prebuiltVoiceConfig: {
97
+ voiceName: string
98
+ }
99
+ }
100
+
101
+ multiSpeakerVoiceConfig?: {
102
+ speakerVoiceConfigs?: Array<{
103
+ speaker: string
104
+ voiceConfig: {
105
+ prebuiltVoiceConfig: {
106
+ voiceName: string
107
+ }
108
+ }
109
+ }>
110
+ }
111
+ /**
112
+ * Language code (in BCP 47 format, e.g. "en-US") for speech synthesis.
113
+
114
+ Valid values are: de-DE, en-AU, en-GB, en-IN, en-US, es-US, fr-FR, hi-IN, pt-BR, ar-XA, es-ES, fr-CA, id-ID, it-IT, ja-JP, tr-TR, vi-VN, bn-IN, gu-IN, kn-IN, ml-IN, mr-IN, ta-IN, te-IN, nl-NL, ko-KR, cmn-CN, pl-PL, ru-RU, and th-TH.
115
+ */
116
+ languageCode?:
117
+ | 'de-DE'
118
+ | 'en-AU'
119
+ | 'en-GB'
120
+ | 'en-IN'
121
+ | 'en-US'
122
+ | 'es-US'
123
+ | 'fr-FR'
124
+ | 'hi-IN'
125
+ | 'pt-BR'
126
+ | 'ar-XA'
127
+ | 'es-ES'
128
+ | 'fr-CA'
129
+ | 'id-ID'
130
+ | 'it-IT'
131
+ | 'ja-JP'
132
+ | 'tr-TR'
133
+ | 'vi-VN'
134
+ | 'bn-IN'
135
+ | 'gu-IN'
136
+ | 'kn-IN'
137
+ | 'ml-IN'
138
+ | 'mr-IN'
139
+ | 'ta-IN'
140
+ | 'te-IN'
141
+ | 'nl-NL'
142
+ | 'ko-KR'
143
+ | 'cmn-CN'
144
+ | 'pl-PL'
145
+ | 'ru-RU'
146
+ | 'th-TH'
147
+ }
148
+ /**
149
+ * Config for image generation. An error will be returned if this field is set for models that don't support these config options.
150
+ */
151
+ imageConfig?: {
152
+ aspectRatio?:
153
+ | '1:1'
154
+ | '2:3'
155
+ | '3:2'
156
+ | '3:4'
157
+ | '4:3'
158
+ | '9:16'
159
+ | '16:9'
160
+ | '21:9'
161
+ }
162
+ /**
163
+ * If specified, the media resolution specified will be used.
164
+ */
165
+ mediaResolution?: MediaResolution
166
+ } & GeminiThinkingOptions &
167
+ GeminiStructuredOutputOptions
168
+ }
169
+
170
+ export interface GeminiCachedContentOptions {
171
+ /**
172
+ * The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}
173
+ */
174
+ cachedContent?: `cachedContents/${string}`
175
+ }
176
+
177
+ export interface GeminiStructuredOutputOptions {
178
+ /**
179
+ * MIME type of the generated candidate text. Supported MIME types are: text/plain: (default) Text output. application/json: JSON response in the response candidates. text/x.enum: ENUM as a string response in the response candidates.
180
+ */
181
+ responseMimeType?: string
182
+ /**
183
+ * Output schema of the generated candidate text. Schemas must be a subset of the OpenAPI schema and can be objects, primitives or arrays.
184
+
185
+ If set, a compatible responseMimeType must also be set. Compatible MIME types: application/json: Schema for JSON response.
186
+ */
187
+ responseSchema?: Schema
188
+ /**
189
+ * Output schema of the generated response. This is an alternative to responseSchema that accepts JSON Schema.
190
+
191
+ If set, responseSchema must be omitted, but responseMimeType is required.
192
+
193
+ While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
194
+
195
+ $id
196
+ $defs
197
+ $ref
198
+ $anchor
199
+ type
200
+ format
201
+ title
202
+ description
203
+ enum (for strings and numbers)
204
+ items
205
+ prefixItems
206
+ minItems
207
+ maxItems
208
+ minimum
209
+ maximum
210
+ anyOf
211
+ oneOf (interpreted the same as anyOf)
212
+ properties
213
+ additionalProperties
214
+ required
215
+ The non-standard propertyOrdering property may also be set.
216
+
217
+ Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If $ref is set on a sub-schema, no other properties, except for than those starting as a $, may be set.
218
+ */
219
+ responseJsonSchema?: Schema
220
+ }
221
+
222
+ export interface GeminiThinkingOptions {
223
+ /**
224
+ * Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
225
+ */
226
+ thinkingConfig?: {
227
+ /**
228
+ * Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.
229
+ */
230
+ includeThoughts: boolean
231
+
232
+ /**
233
+ * The number of thoughts tokens that the model should generate.
234
+ */
235
+ thinkingBudget: number
236
+ /**
237
+ * The level of thoughts tokens that the model should generate.
238
+ */
239
+ thinkingLevel?: ThinkingLevel
240
+ }
241
+ }
242
+
243
+ export type ExternalTextProviderOptions = GeminiToolConfigOptions &
244
+ GeminiSafetyOptions &
245
+ GeminiGenerationConfigOptions &
246
+ GeminiCachedContentOptions
@@ -0,0 +1,17 @@
1
+ import type { Tool } from '@tanstack/ai'
2
+
3
+ export interface CodeExecutionTool {}
4
+
5
+ export function convertCodeExecutionToolToAdapterFormat(_tool: Tool) {
6
+ return {
7
+ codeExecution: {},
8
+ }
9
+ }
10
+
11
+ export function codeExecutionTool(): Tool {
12
+ return {
13
+ name: 'code_execution',
14
+ description: '',
15
+ metadata: {},
16
+ }
17
+ }
@@ -0,0 +1,25 @@
1
+ import type { ComputerUse } from '@google/genai'
2
+ import type { Tool } from '@tanstack/ai'
3
+
4
+ export type ComputerUseTool = ComputerUse
5
+
6
+ export function convertComputerUseToolToAdapterFormat(tool: Tool) {
7
+ const metadata = tool.metadata as ComputerUseTool
8
+ return {
9
+ computerUse: {
10
+ environment: metadata.environment,
11
+ excludedPredefinedFunctions: metadata.excludedPredefinedFunctions,
12
+ },
13
+ }
14
+ }
15
+
16
+ export function computerUseTool(config: ComputerUseTool): Tool {
17
+ return {
18
+ name: 'computer_use',
19
+ description: '',
20
+ metadata: {
21
+ environment: config.environment,
22
+ excludedPredefinedFunctions: config.excludedPredefinedFunctions,
23
+ },
24
+ }
25
+ }
@@ -0,0 +1,19 @@
1
+ import type { Tool } from '@tanstack/ai'
2
+ import type { FileSearch } from '@google/genai'
3
+
4
+ export type FileSearchTool = FileSearch
5
+
6
+ export function convertFileSearchToolToAdapterFormat(tool: Tool) {
7
+ const metadata = tool.metadata as FileSearchTool
8
+ return {
9
+ fileSearch: metadata,
10
+ }
11
+ }
12
+
13
+ export function fileSearchTool(config: FileSearchTool): Tool {
14
+ return {
15
+ name: 'file_search',
16
+ description: '',
17
+ metadata: config,
18
+ }
19
+ }
@@ -0,0 +1,34 @@
1
+ import type { FunctionDeclaration } from '@google/genai'
2
+
3
+ export type FunctionDeclarationTool = FunctionDeclaration
4
+
5
+ const validateFunctionDeclarationTool = (tool: FunctionDeclarationTool) => {
6
+ const nameRegex = /^[a-zA-Z0-9_:.-]{1,64}$/
7
+ const valid = nameRegex.test(tool.name!)
8
+ if (!valid) {
9
+ throw new Error(
10
+ `Invalid function name: ${tool.name}. Must be 1-64 characters long and contain only a-z, A-Z, 0-9, underscores, colons, dots, and dashes.`,
11
+ )
12
+ }
13
+
14
+ if (tool.parameters && tool.parametersJsonSchema) {
15
+ throw new Error(
16
+ `FunctionDeclarationTool cannot have both 'parameters' and 'parametersJsonSchema' defined. Please use only one.`,
17
+ )
18
+ }
19
+
20
+ if (tool.response && tool.responseJsonSchema) {
21
+ throw new Error(
22
+ `FunctionDeclarationTool cannot have both 'response' and 'responseJsonSchema' defined. Please use only one.`,
23
+ )
24
+ }
25
+ }
26
+
27
+ export function functionDeclarationTools(
28
+ tools: Array<FunctionDeclarationTool>,
29
+ ) {
30
+ tools.forEach(validateFunctionDeclarationTool)
31
+ return {
32
+ functionDeclarations: tools,
33
+ }
34
+ }
@@ -0,0 +1,19 @@
1
+ import type { GoogleMaps } from '@google/genai'
2
+ import type { Tool } from '@tanstack/ai'
3
+
4
+ export type GoogleMapsTool = GoogleMaps
5
+
6
+ export function convertGoogleMapsToolToAdapterFormat(tool: Tool) {
7
+ const metadata = tool.metadata as GoogleMapsTool
8
+ return {
9
+ googleMaps: metadata,
10
+ }
11
+ }
12
+
13
+ export function googleMapsTool(config?: GoogleMapsTool): Tool {
14
+ return {
15
+ name: 'google_maps',
16
+ description: '',
17
+ metadata: config,
18
+ }
19
+ }
@@ -0,0 +1,21 @@
1
+ import type { GoogleSearchRetrieval } from '@google/genai'
2
+ import type { Tool } from '@tanstack/ai'
3
+
4
+ export type GoogleSearchRetrievalTool = GoogleSearchRetrieval
5
+
6
+ export function convertGoogleSearchRetrievalToolToAdapterFormat(tool: Tool) {
7
+ const metadata = tool.metadata as GoogleSearchRetrievalTool
8
+ return {
9
+ googleSearchRetrieval: metadata,
10
+ }
11
+ }
12
+
13
+ export function googleSearchRetrievalTool(
14
+ config?: GoogleSearchRetrievalTool,
15
+ ): Tool {
16
+ return {
17
+ name: 'google_search_retrieval',
18
+ description: '',
19
+ metadata: config,
20
+ }
21
+ }
@@ -0,0 +1,19 @@
1
+ import type { GoogleSearch } from '@google/genai'
2
+ import type { Tool } from '@tanstack/ai'
3
+
4
+ export type GoogleSearchTool = GoogleSearch
5
+
6
+ export function convertGoogleSearchToolToAdapterFormat(tool: Tool) {
7
+ const metadata = tool.metadata as GoogleSearchTool
8
+ return {
9
+ googleSearch: metadata,
10
+ }
11
+ }
12
+
13
+ export function googleSearchTool(config?: GoogleSearchTool): Tool {
14
+ return {
15
+ name: 'google_search',
16
+ description: '',
17
+ metadata: config,
18
+ }
19
+ }
@@ -0,0 +1,18 @@
1
+ import type { CodeExecutionTool } from './code-execution-tool'
2
+ import type { ComputerUseTool } from './computer-use-tool'
3
+ import type { FileSearchTool } from './file-search-tool'
4
+ import type { FunctionDeclarationTool } from './function-declaration-tool'
5
+ import type { GoogleMapsTool } from './google-maps-tool'
6
+ import type { GoogleSearchRetrievalTool } from './google-search-retriveal-tool'
7
+ import type { GoogleSearchTool } from './google-search-tool'
8
+ import type { UrlContextTool } from './url-context-tool'
9
+
10
+ export type GoogleGeminiTool =
11
+ | CodeExecutionTool
12
+ | ComputerUseTool
13
+ | FileSearchTool
14
+ | FunctionDeclarationTool
15
+ | GoogleMapsTool
16
+ | GoogleSearchRetrievalTool
17
+ | GoogleSearchTool
18
+ | UrlContextTool
@@ -0,0 +1,99 @@
1
+ import { convertZodToJsonSchema } from '@tanstack/ai'
2
+ import { convertCodeExecutionToolToAdapterFormat } from './code-execution-tool'
3
+ import { convertComputerUseToolToAdapterFormat } from './computer-use-tool'
4
+ import { convertFileSearchToolToAdapterFormat } from './file-search-tool'
5
+ import { convertGoogleMapsToolToAdapterFormat } from './google-maps-tool'
6
+ import { convertGoogleSearchRetrievalToolToAdapterFormat } from './google-search-retriveal-tool'
7
+ import { convertGoogleSearchToolToAdapterFormat } from './google-search-tool'
8
+ import { convertUrlContextToolToAdapterFormat } from './url-context-tool'
9
+ import type { Tool } from '@tanstack/ai'
10
+ import type { ToolUnion } from '@google/genai'
11
+
12
+ /**
13
+ * Converts standard Tool format to Gemini-specific tool format
14
+ *
15
+ * @param tools - Array of standard Tool objects
16
+ * @returns Array of Gemini-specific tool definitions
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * const tools: Tool[] = [{
21
+ * name: "get_weather",
22
+ * description: "Get weather for a location",
23
+ * inputSchema: z.object({
24
+ * location: z.string()
25
+ * })
26
+ * }];
27
+ *
28
+ * const geminiTools = convertToolsToProviderFormat(tools);
29
+ * ```
30
+ */
31
+ export function convertToolsToProviderFormat<TTool extends Tool>(
32
+ tools: Array<TTool> | undefined,
33
+ ): Array<ToolUnion> {
34
+ if (!tools || tools.length === 0) {
35
+ return []
36
+ }
37
+ const result: Array<ToolUnion> = []
38
+ const functionDeclarations: Array<{
39
+ name: string
40
+ description?: string
41
+ parameters?: any
42
+ }> = []
43
+
44
+ // Process each tool and group function declarations together
45
+ for (const tool of tools) {
46
+ const name = tool.name
47
+
48
+ switch (name) {
49
+ case 'code_execution':
50
+ result.push(convertCodeExecutionToolToAdapterFormat(tool))
51
+ break
52
+ case 'computer_use':
53
+ result.push(convertComputerUseToolToAdapterFormat(tool))
54
+ break
55
+ case 'file_search':
56
+ result.push(convertFileSearchToolToAdapterFormat(tool))
57
+ break
58
+ case 'google_maps':
59
+ result.push(convertGoogleMapsToolToAdapterFormat(tool))
60
+ break
61
+ case 'google_search_retrieval':
62
+ result.push(convertGoogleSearchRetrievalToolToAdapterFormat(tool))
63
+ break
64
+ case 'google_search':
65
+ result.push(convertGoogleSearchToolToAdapterFormat(tool))
66
+ break
67
+ case 'url_context':
68
+ result.push(convertUrlContextToolToAdapterFormat(tool))
69
+ break
70
+ default:
71
+ // Collect function declarations to group together
72
+ // Description is required for Gemini function declarations
73
+ if (!tool.description) {
74
+ throw new Error(
75
+ `Tool ${tool.name} requires a description for Gemini adapter`,
76
+ )
77
+ }
78
+
79
+ // Convert Zod schema to JSON Schema
80
+ const jsonSchema = convertZodToJsonSchema(tool.inputSchema)
81
+
82
+ functionDeclarations.push({
83
+ name: tool.name,
84
+ description: tool.description,
85
+ parameters: jsonSchema,
86
+ })
87
+ break
88
+ }
89
+ }
90
+
91
+ // If we have function declarations, add them as a single tool
92
+ if (functionDeclarations.length > 0) {
93
+ result.push({
94
+ functionDeclarations: functionDeclarations,
95
+ })
96
+ }
97
+
98
+ return result
99
+ }
@@ -0,0 +1,17 @@
1
+ import type { Tool } from '@tanstack/ai'
2
+
3
+ export interface UrlContextTool {}
4
+
5
+ export function convertUrlContextToolToAdapterFormat(_tool: Tool) {
6
+ return {
7
+ urlContext: {},
8
+ }
9
+ }
10
+
11
+ export function urlContextTool(): Tool {
12
+ return {
13
+ name: 'url_context',
14
+ description: '',
15
+ metadata: {},
16
+ }
17
+ }