@@ -176,7 +176,6 @@ def server_info
176
176
end
177
177
178
178
def init ( request )
179
- add_instrumentation_data ( method : Methods ::INITIALIZE )
180
179
{
181
180
protocolVersion : configuration . protocol_version ,
182
181
capabilities : capabilities ,
@@ -185,12 +184,10 @@ def init(request)
185
184
end
186
185
187
186
def list_tools ( request )
188
- add_instrumentation_data ( method : Methods ::TOOLS_LIST )
189
187
@tools . map { |_ , tool | tool . to_h }
190
188
end
191
189
192
190
def call_tool ( request )
193
- add_instrumentation_data ( method : Methods ::TOOLS_CALL )
194
191
tool_name = request [ :name ]
195
192
tool = tools [ tool_name ]
196
193
unless tool
@@ -224,12 +221,10 @@ def call_tool(request)
224
221
end
225
222
226
223
def list_prompts ( request )
227
- add_instrumentation_data ( method : Methods ::PROMPTS_LIST )
228
224
@prompts . map { |_ , prompt | prompt . to_h }
229
225
end
230
226
231
227
def get_prompt ( request )
232
- add_instrumentation_data ( method : Methods ::PROMPTS_GET )
233
228
prompt_name = request [ :name ]
234
229
prompt = @prompts [ prompt_name ]
235
230
unless prompt
@@ -246,21 +241,16 @@ def get_prompt(request)
246
241
end
247
242
248
243
def list_resources ( request )
249
- add_instrumentation_data ( method : Methods ::RESOURCES_LIST )
250
-
251
244
@resources . map ( &:to_h )
252
245
end
253
246
254
247
# Server implementation should set `resources_read_handler` to override no-op default
255
248
def read_resource_no_content ( request )
256
- add_instrumentation_data ( method : Methods ::RESOURCES_READ )
257
249
add_instrumentation_data ( resource_uri : request [ :uri ] )
258
250
[ ]
259
251
end
260
252
261
253
def list_resource_templates ( request )
262
- add_instrumentation_data ( method : Methods ::RESOURCES_TEMPLATES_LIST )
263
-
264
254
@resource_templates . map ( &:to_h )
265
255
end
266
256
0 commit comments