obsidian_fetch 0.1.6 → 0.1.8

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: 1ab7ba42f7a67da1459326453ef3673f99dbf51c1b2f3dcef2fcebf69c9c30e5
4
- data.tar.gz: c6851da235eef1bcf76b22aa3efef6147edbdb31c9b5999f07139982e352ff43
3
+ metadata.gz: be242fb83e36e23491358f1109b2cf71b0b849d685aadc5752483733d8d92b3b
4
+ data.tar.gz: f960f0a39c9a008e35a27f4d420440583232907c8f2114be8df84de12f66a67d
5
5
  SHA512:
6
- metadata.gz: 8d91e267af94e9bdc50544ba814c3f48edffee185f25584ce3d371ac1732f61b82041df33ec7a4accdbe5c0b696ca210cc81b92681302289e172ef4561a99696
7
- data.tar.gz: c4808045178cfd65452d174bbc4ca80c83784ada9b2924040b4654be94b7a90a28aa81d5836178690da994ee3a0ceb167ca7574b2e5f7aac4c2583790a31b5f2
6
+ metadata.gz: '00738a009acd96f5545035d30a5c4fc96987c90d014abd62c2b159c09a4c3e2ee64bbc85ea454242f1c86b0124deafa06f2d1fba010fb0445a1e5a55434357f5'
7
+ data.tar.gz: bde26b406b1cad4f1554b17970ed8d79ab816cbd2735ff8542e82ebc53d3934b95d9f4ad5a03216141af0a0b125ed82d106a22008eb2ea7d6816b7acae1954eb
data/README.md CHANGED
@@ -1,38 +1,35 @@
1
1
  # ObsidianFetch
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ MCP servers specialising in retrieving information from Obsidian vaults.
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/obsidian_fetch`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ The existing MCP server has the following drawbacks:
6
+ - There are many commands, and when computational resources are limited, it can take a long time to load the prompt.
7
+ - When reading a note labeled "LLM," it is necessary to search for the path first before loading it, but the LLM may not always follow this procedure.
8
+ - Some tools have unnecessary options, causing the LLM to sometimes fail to invoke the tool correctly.
6
9
 
7
- ## Installation
10
+ These issues become particularly noticeable when running an LLM on a local GPU.
11
+ To address this, we developed a new MCP server that simply retrieves and loads a list of notes.
8
12
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
13
+ Additionally, the new server has the following features:
14
+ - When the LLM tries to retrieve link information and searches with brackets like `[[link name]]`, it automatically removes characters that cannot be used in links.
15
+ - When reading a file, if there are links pointing to the opened file, it displays them.
16
+ - Especially in network-style note tools like Obsidian, following such links to load related notes can be very powerful.
10
17
 
11
- Install the gem and add to the application's Gemfile by executing:
18
+ ## Installation
12
19
 
13
20
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21
+ gem install obsidian_fetch
15
22
  ```
16
23
 
17
- If bundler is not being used to manage dependencies, install the gem by executing:
24
+ ## Usage
18
25
 
19
26
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
27
+ obsidian_fetch /path/to/your/vault
21
28
  ```
22
29
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake ` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
30
  ## Contributing
34
31
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/obsidian_fetch.
32
+ Bug reports and pull requests are welcome on GitHub at https://github.com/soukouki/obsidian_fetch.
36
33
 
37
34
  ## License
38
35
 
data/exe/obsidian_fetch CHANGED
@@ -24,7 +24,7 @@ tool 'read' do
24
24
  name = args[:name]
25
25
  # 名前が文字列でない場合
26
26
  next 'Name must be a string' unless name.is_a?(String)
27
- tool_read(vault, name)
27
+ ObsidianFetch::tool_read(vault, name)
28
28
  end
29
29
  end
30
30
 
@@ -39,7 +39,7 @@ tool 'read_multiple' do
39
39
  # 名前が文字列の配列でない場合
40
40
  next 'Name must be an array of strings' unless names.is_a?(Array) && names.all? { |name| name.is_a?(String) }
41
41
  names.map do |name|
42
- tool_read(vault, name)
42
+ ObsidianFetch::tool_read(vault, name)
43
43
  end.join("\n\n---\n\n")
44
44
  end
45
45
  end
@@ -53,7 +53,7 @@ tool 'list' do
53
53
  name = args[:name]
54
54
  # 名前が文字列でない場合
55
55
  next 'Name must be a string' unless name.is_a?(String)
56
- tool_list(vault, name)
56
+ ObsidianFetch::tool_list(vault, name)
57
57
  end
58
58
  end
59
59
 
@@ -67,7 +67,7 @@ tool 'list_multiple' do
67
67
  # 名前が文字列の配列でない場合
68
68
  next 'Name must be an array of strings' unless names.is_a?(Array) && names.all? { |name| name.is_a?(String) }
69
69
  names.map do |name|
70
- tool_list(vault, name)
70
+ ObsidianFetch::tool_list(vault, name)
71
71
  end.join("\n\n---\n\n")
72
72
  end
73
73
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ObsidianFetch
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.8"
5
5
  end
@@ -129,7 +129,7 @@ module ObsidianFetch
129
129
  end
130
130
  end
131
131
 
132
- def tool_read vault, name
132
+ def self.tool_read vault, name
133
133
  name = Vault.normalize_note_name(name)
134
134
  file_pathes = vault.notes[name]
135
135
  # 名前のノートが存在しない場合
@@ -165,7 +165,7 @@ module ObsidianFetch
165
165
  end
166
166
 
167
167
  MAX_LIST_SIZE = 20
168
- def tool_list vault, name
168
+ def self.tool_list vault, name
169
169
  name = Vault.normalize_note_name(name)
170
170
  split_name = name.split(/[\s ]+/)
171
171
  matched_notes = vault.notes.select do |note_name, _file_pathes|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obsidian_fetch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - sou7