active_mcp 0.10.5 → 0.10.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7a6dec91d1f48ced13dc1699bf78b251961a4dfaf41b1c95531465c618c3ba2
4
- data.tar.gz: e21b02b26027a3d87c44231f4cf7076febd82746e4a222fe1112a8b6b650ba12
3
+ metadata.gz: 93ccaa05722a21cba3848bdd01f1e06093336995c160a95627d0ce959bc43c41
4
+ data.tar.gz: 21c775034a7dfbdab65bdab4dd9875920a80a0f8398f600f7ce7edfe6775f174
5
5
  SHA512:
6
- metadata.gz: eace2e1b1abdfca71fe7884d654e8d698a07e0c1f175462db46a80f798e2b8a31d2561a8b3c95f558ed3d3f374ab3013f341d3eb3733e79d6f9650617ac05137
7
- data.tar.gz: 231879557b7ec110bf2810e0ee66566cbd1bc791d695bff869b9ac197c67cfdba16e3aea1aa1fd5b2821517c99726f50d3698cdd27d499d76fa165584d7e6b72
6
+ metadata.gz: c82327781df5e274a63cdf39156e962906ad8dc572ea20a52a27a5b1f9a1bad21d499fa71fc0b3d1384508f3d894a480ac95e5bfc4e34de13d3f51fe80a48a5e
7
+ data.tar.gz: db3f5fb7f7ca0d6e97bda8b3cbce693b950df17a4f3378e8ce3903932ee52c8ef708c02dd94b9ed59bc5b2fa2c842e937c05a4e0d1a8934ce036863ac8eeb8c9
data/README.md CHANGED
@@ -350,6 +350,12 @@ Resources are Ruby classes `**Resource`:
350
350
 
351
351
  ```ruby
352
352
  class UserResource < ActiveMcp::Resource::Base
353
+ class << self
354
+ def mime_type
355
+ "application/json"
356
+ end
357
+ end
358
+
353
359
  def initialize(id:)
354
360
  @user = User.find(id)
355
361
  end
@@ -362,10 +368,6 @@ class UserResource < ActiveMcp::Resource::Base
362
368
  "data://localhost/users/#{@user.id}"
363
369
  end
364
370
 
365
- def mime_type
366
- "application/json"
367
- end
368
-
369
371
  def description
370
372
  @user.profile
371
373
  end
@@ -6,14 +6,11 @@ module ActiveMcp
6
6
  [
7
7
  Rails.root.join("app", "mcp", "tools"),
8
8
  Rails.root.join("app", "mcp", "resources"),
9
- Rails.root.join("app", "mcp", "resource_templates"),
10
9
  Rails.root.join("app", "mcp", "prompts"),
11
10
  Rails.root.join("app", "mcp", "schemas")
12
- ].each do |tools_path|
13
- if Dir.exist?(tools_path)
14
- Dir[tools_path.join("*.rb")].sort.each do |file|
15
- require_dependency file
16
- end
11
+ ].each do |path|
12
+ if Dir.exist?(path)
13
+ app.autoloaders.main.push_dir(path)
17
14
  end
18
15
  end
19
16
  end
@@ -39,6 +39,7 @@ module ActiveMcp
39
39
  request = Net::HTTP::Post.new(uri)
40
40
  request.body = JSON.generate(params)
41
41
  request["Content-Type"] = "application/json"
42
+ request["Accept"] = "application/json"
42
43
  request["Authorization"] = @auth_header
43
44
 
44
45
  begin
@@ -1,3 +1,3 @@
1
1
  module ActiveMcp
2
- VERSION = "0.10.5"
2
+ VERSION = "0.10.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moeki Kawakami
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-09 00:00:00.000000000 Z
11
+ date: 2025-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails