zeromcp 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/zeromcp/server.rb +2 -3
- data/lib/zeromcp/tool.rb +4 -1
- data/zeromcp.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbe9bf54912165bb33c8934830b2e743a9ac0b7248db1bff952c055ae98da075
|
|
4
|
+
data.tar.gz: 8507519d2addb779518363c2630032b3e89e72ea1ab4413c976c5d424928e0ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e59df47759f27cd5f832b55ebd9139e7874732186ef188ef7eae2d2150284f0d055ec6c1beae462e09ad54b396b8fd82ff52a54c5680375fc9e9fd7384b520bd
|
|
7
|
+
data.tar.gz: 7958981ea82048324f9a5a81bb3ba9d483a9f5b0d9ae59877e150767af59712ac3aa2d99fa5c2a91a586957441661f99a2154e1c88f07458a85a731db583631f
|
data/lib/zeromcp/server.rb
CHANGED
|
@@ -127,7 +127,7 @@ module ZeroMcp
|
|
|
127
127
|
{
|
|
128
128
|
'name' => name,
|
|
129
129
|
'description' => tool.description,
|
|
130
|
-
'inputSchema' =>
|
|
130
|
+
'inputSchema' => tool.cached_schema
|
|
131
131
|
}
|
|
132
132
|
end
|
|
133
133
|
end
|
|
@@ -145,8 +145,7 @@ module ZeroMcp
|
|
|
145
145
|
}
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
-
|
|
149
|
-
errors = Schema.validate(args, schema)
|
|
148
|
+
errors = Schema.validate(args, tool.cached_schema)
|
|
150
149
|
if errors.any?
|
|
151
150
|
return {
|
|
152
151
|
'content' => [{ 'type' => 'text', 'text' => "Validation errors:\n#{errors.join("\n")}" }],
|
data/lib/zeromcp/tool.rb
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative 'schema'
|
|
4
|
+
|
|
3
5
|
module ZeroMcp
|
|
4
6
|
class Tool
|
|
5
|
-
attr_reader :name, :description, :input, :permissions, :execute_block
|
|
7
|
+
attr_reader :name, :description, :input, :permissions, :execute_block, :cached_schema
|
|
6
8
|
|
|
7
9
|
def initialize(name:, description: '', input: {}, permissions: {}, &block)
|
|
8
10
|
@name = name
|
|
@@ -10,6 +12,7 @@ module ZeroMcp
|
|
|
10
12
|
@input = input
|
|
11
13
|
@permissions = permissions
|
|
12
14
|
@execute_block = block
|
|
15
|
+
@cached_schema = Schema.to_json_schema(@input)
|
|
13
16
|
end
|
|
14
17
|
|
|
15
18
|
def call(args, ctx = {})
|
data/zeromcp.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zeromcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Antidrift
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Drop tool files in a directory, get a working MCP server. Zero boilerplate.
|
|
14
14
|
email: hello@probeo.io
|