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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41b858d5fbd0613813087cb8ddb4af7f37ca0e14650dbd754937c8dd7450f5c6
4
- data.tar.gz: 9a33ac859956b5dd640654a81e83c22be566216c415812e0d5f70444113ebe3f
3
+ metadata.gz: cbe9bf54912165bb33c8934830b2e743a9ac0b7248db1bff952c055ae98da075
4
+ data.tar.gz: 8507519d2addb779518363c2630032b3e89e72ea1ab4413c976c5d424928e0ec
5
5
  SHA512:
6
- metadata.gz: e0643b96c9e9c5e44bc67bf19bff9a564d947109a95ad1d1abf3d0d1d3a7fabc12e6333fca931096a84400b917a56c019aada8d7df18141adc03e2f44504e9c4
7
- data.tar.gz: c980ba8e71e11bddfbfaa006ceda4a359c9fa5c05008781fa2876998bfe8f13bf0d7c34b4e23673fac6a5a2fc953043e45cebaa7ce2e2f5bbfc3313846454161
6
+ metadata.gz: e59df47759f27cd5f832b55ebd9139e7874732186ef188ef7eae2d2150284f0d055ec6c1beae462e09ad54b396b8fd82ff52a54c5680375fc9e9fd7384b520bd
7
+ data.tar.gz: 7958981ea82048324f9a5a81bb3ba9d483a9f5b0d9ae59877e150767af59712ac3aa2d99fa5c2a91a586957441661f99a2154e1c88f07458a85a731db583631f
@@ -127,7 +127,7 @@ module ZeroMcp
127
127
  {
128
128
  'name' => name,
129
129
  'description' => tool.description,
130
- 'inputSchema' => Schema.to_json_schema(tool.input)
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
- schema = Schema.to_json_schema(tool.input)
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'zeromcp'
5
- s.version = '0.1.0'
5
+ s.version = '0.1.1'
6
6
  s.summary = 'Zero-config MCP runtime'
7
7
  s.description = 'Drop tool files in a directory, get a working MCP server. Zero boilerplate.'
8
8
  s.authors = ['Antidrift']
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.0
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-06 00:00:00.000000000 Z
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