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 +4 -4
- data/README.md +16 -19
- data/exe/obsidian_fetch +4 -4
- data/lib/obsidian_fetch/version.rb +1 -1
- data/lib/obsidian_fetch.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be242fb83e36e23491358f1109b2cf71b0b849d685aadc5752483733d8d92b3b
|
4
|
+
data.tar.gz: f960f0a39c9a008e35a27f4d420440583232907c8f2114be8df84de12f66a67d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '00738a009acd96f5545035d30a5c4fc96987c90d014abd62c2b159c09a4c3e2ee64bbc85ea454242f1c86b0124deafa06f2d1fba010fb0445a1e5a55434357f5'
|
7
|
+
data.tar.gz: bde26b406b1cad4f1554b17970ed8d79ab816cbd2735ff8542e82ebc53d3934b95d9f4ad5a03216141af0a0b125ed82d106a22008eb2ea7d6816b7acae1954eb
|
data/README.md
CHANGED
@@ -1,38 +1,35 @@
|
|
1
1
|
# ObsidianFetch
|
2
2
|
|
3
|
-
|
3
|
+
MCP servers specialising in retrieving information from Obsidian vaults.
|
4
4
|
|
5
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
18
|
+
## Installation
|
12
19
|
|
13
20
|
```bash
|
14
|
-
|
21
|
+
gem install obsidian_fetch
|
15
22
|
```
|
16
23
|
|
17
|
-
|
24
|
+
## Usage
|
18
25
|
|
19
26
|
```bash
|
20
|
-
|
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/
|
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
|
data/lib/obsidian_fetch.rb
CHANGED
@@ -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|
|