Commit graph

294 commits

Author SHA1 Message Date
Topher Bullock
944660a8b0
Merge pull request #167 from modelcontextprotocol/release-0.4.0 v0.4.0
Release v0.4.0
2025-10-15 14:56:18 -04:00
Topher Bullock
9aafc9add5 Release 0.4.0 2025-10-15 01:25:05 -04:00
Koichi ITO
f312695798
Merge pull request #153 from modelcontextprotocol/prompt-spec-compliance
fix `Prompt` type gaps with 2025-06-18 spec
2025-10-15 01:22:45 +09:00
Koichi ITO
f8557e5ceb
Merge pull request #166 from dak2/fix-client-tools-test
Fix and add test for client tools functionality
2025-10-14 01:49:22 +09:00
dak2
7b4ece294b Fix and add test for client tools functionality
- Add test for empty tools array response to ensure client handles empty
  results correctly
- Update call_tool test to use proper content format (array of content
  objects) instead of plain string based on
  modelcontextprotocol spec.
  https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-03-26/server/tools.mdx#calling-tools

Follow up: modelcontextprotocol#160
2025-10-13 11:14:48 +09:00
Koichi ITO
92a08bafc7
Merge pull request #162 from dak2/fix-client-resouces-test
Fix test for empty resources response of client
2025-10-13 02:02:25 +09:00
Koichi ITO
5b57563738
Merge pull request #161 from koic/mention_mcp_client_resources_methods_to_readme
[Doc] Mention `resources/list` and `resources/read` in the README
2025-10-12 11:28:30 +09:00
dak2
ad3c1b1b72 Fix test for empty resources response
Update test_resources_returns_empty_array_when_no_resources to use
correct mock response format with empty resources array instead of
empty result object. Also reorder test to group with other resources
tests.

Follow up: https://github.com/modelcontextprotocol/ruby-sdk/pull/160
2025-10-12 00:44:17 +09:00
Koichi ITO
93215f4d52 [Doc] Mention resources/list and resources/read in the README
Follow-up to https://github.com/modelcontextprotocol/ruby-sdk/pull/160
2025-10-12 00:33:01 +09:00
Koichi ITO
c51060031a
Merge pull request #160 from modelcontextprotocol/client-add-resource-support
add `resources/list` and `resources/read` support to client
2025-10-11 01:16:06 +09:00
Topher Bullock
2d1a1da937 add resources/list and resources/read support to client 2025-10-10 10:51:42 -04:00
Topher Bullock
a1dd3dd005 add _meta field to Prompt
> See [General fields: `_meta`](/specification/2025-06-18/basic/index#meta) for notes on `_meta` usage.

51e093b8eb/schema/2025-06-18/schema.ts (L680-L683)
2025-10-10 09:05:55 -04:00
Koichi ITO
b10a469013
Merge pull request #157 from koic/fix_a_typo_for_streamable_http_transport
[Doc] Fix incorrect example code in README
2025-10-10 01:03:52 +09:00
Koichi ITO
a217f70d95 [Doc] Fix incorrect example code in README
Follow-up to https://github.com/modelcontextprotocol/ruby-sdk/pull/33.

A `NameError` occurs because `MCP::Transports::HTTP` does not exist.
The correct constant is `MCP::Server::Transports::StreamableHTTPTransport`.
2025-10-09 11:44:58 +09:00
Koichi ITO
77370cbb93
Merge pull request #154 from koic/remove_redundant_requiring_transports
Remove unnecessary transport requires
2025-10-08 12:06:31 +09:00
Koichi ITO
bee6eace22 Remove unnecessary transport requires
The transports are already required by `require 'mcp'`:
https://github.com/modelcontextprotocol/ruby-sdk/blob/v0.3.0/lib/mcp.rb#L16-L17
2025-10-07 14:10:48 +09:00
Topher Bullock
701f6faab6 add title field to prompt argument
`PromptArgument extends BaseMetadata`, which includes both name and
title
 - 51e093b8eb/schema/2025-06-18/schema.ts (L686-L698)
 - 51e093b8eb/schema/2025-06-18/schema.ts (L294-l309)
2025-10-06 09:35:42 -04:00
Koichi ITO
b5e344e456
Merge pull request #132 from dr03ramos/patch-1
Update metaschema URI format in input_schema.rb
2025-10-06 10:34:47 +09:00
Koichi ITO
f226e57ce3
Merge pull request #152 from modelcontextprotocol/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 3 to 5
2025-10-05 02:47:54 +09:00
dependabot[bot]
e41d961e4c
Bump actions/checkout from 3 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-04 16:35:48 +00:00
Koichi ITO
04de0c8be9
Merge pull request #151 from koic/move_dependabot_yml
Move dependabot.yml into .github
2025-10-05 01:35:06 +09:00
ramos
4c13f6dc08 Update metaschema URI format in input_schema.rb and output_schema.rb for
cross-compatibility across different OS
2025-10-03 17:29:50 -03:00
Koichi ITO
435b8c8b22 Move dependabot.yml into .github
Follow-up to https://github.com/modelcontextprotocol/ruby-sdk/pull/138.

The `dependabot.yml` file must be placed under the `.github` directory,
but it was mistakenly placed outside of it.
2025-10-04 00:14:49 +09:00
Koichi ITO
c5f2f98077
Merge pull request #150 from koic/set_default_content_to_an_empty_array_instead_of_nil
Set default `content` to an empty array instead of `nil`
2025-10-03 10:22:46 +09:00
Koichi ITO
0034952df9 Set default content to an empty array instead of nil
Follow-up to https://github.com/modelcontextprotocol/ruby-sdk/pull/147.

According to the specification schema, `content` is not optional and therefore cannot be omitted:

```typescript
interface CallToolResult {
  _meta?: { [key: string]: unknown };
  content: ContentBlock[];
  isError?: boolean;
  structuredContent?: { [key: string]: unknown };
  [key: string]: unknown;
}
```

https://modelcontextprotocol.io/specification/2025-06-18/schema#calltoolresult

Instead of `nil`, an empty array is set as the default value.

There may be a better value for `content`, but at the very least it should not be missing.
2025-10-02 23:52:19 +09:00
Tyler Untisz
73cec83b99
Add support for _meta field on tool schema (#124)
* Add support for _meta field on tool schema

* use `meta` naming for `_meta` field on tool schema

* apply suggestions to fix `_meta` tests

Co-authored-by: Ateş Göral <ates@magnetiq.com>

* Update lib/mcp/tool.rb

Co-authored-by: Ateş Göral <ates@magnetiq.com>

* Update lib/mcp/tool.rb

Co-authored-by: Ateş Göral <ates@magnetiq.com>

---------

Co-authored-by: Topher Bullock <topherbullock@users.noreply.github.com>
Co-authored-by: Ateş Göral <ates@magnetiq.com>
2025-10-01 17:21:27 -04:00
Topher Bullock
c0f7605d25
Merge pull request #149 from juharris/client-call_tool_raw
[client] Change call_tool method to return the full tool response to help get structuredContent
2025-10-01 15:37:49 -04:00
Justin Harris
ae60e2d904
[client] Add call_tool_raw method to get the full tool response to help get structuredContent 2025-10-01 15:18:02 -04:00
Koichi ITO
010ae74edc
Merge pull request #145 from koic/add_validation_to_mcp_configuration_setters
Add validation to `MCP::Configuration` setters
2025-10-01 10:50:38 +09:00
Koichi ITO
f21629ca74
Merge pull request #148 from koic/remove_redundant_sort_in_spec
Remove redundant sort in spec
2025-09-30 00:17:12 +09:00
Koichi ITO
777785b333 Remove redundant sort in spec 2025-09-29 01:24:38 +09:00
Koichi ITO
de1e833ae3
Merge pull request #144 from nilcolor/output_schema_arrays
Allow output schema to be array of objects
2025-09-28 03:17:09 +09:00
Anandaroop Roy
f7cf080cc0
Support structuredContent in tool response (#147) 2025-09-27 02:23:41 -04:00
Koichi ITO
99b57a3cc2
Merge pull request #114 from dak2/handle-202
Fix to return a response code 202 if the server accepts JSON-RPC notifications and responses
2025-09-27 14:00:17 +09:00
Koichi ITO
8f682c4ff6
Merge pull request #146 from koic/fix_some_typos
Fix some typos
2025-09-26 10:12:46 +09:00
dak2
cd7a54a5c9 Fix to return a response code 202 if the server accepts JSON-RPC notifications and responses
If the server accepts JSON-RPC notifications and responses, it must return an HTTP status code of 202 without a body.

refs
- https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#sending-messages-to-the-server
- https://www.jsonrpc.org/specification

Follow up: https://github.com/modelcontextprotocol/ruby-sdk/issues/111
2025-09-26 00:18:01 +09:00
Koichi ITO
99f90b8b31 Fix some typos
The `ModelContextProtocol` module name has been renamed to `MCP`,
and `define_protocol` appears to be a typo for `define_prompt`.
2025-09-25 18:06:34 +09:00
Alexey Blinov
4ee128ad67 Allow output schema to be array of objects
closes #142
2025-09-25 11:56:03 +05:00
Koichi ITO
cb5e87581b Add validation to MCP::Configuration setters
I noticed through the existing tests that `MCP::Configuration#protocol_version=`
allows setting an arbitrary protocol version.

Since the official MCP Ruby SDK is an implementation of the MCP specification,
it should not support arbitrary protocol versions. This change adds validation
to the setter, consistent with `Configuration#initialize`.

The same validation has also been added to `MCP::Configuration#validate_tool_call_arguments=`.
2025-09-24 19:19:02 +09:00
Ateş Göral
aba616342f
Add AGENTS.md with comprehensive development guidance (#134)
* Add CLAUDE.md with development guidance and architecture overview

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Rename CLAUDE.md to AGENTS.md and restructure to follow agents.md standard

- Adopt the new agents.md format for AI coding assistant guidance
- Reorganize content into standard sections: project overview, dev setup, build commands, testing, code style, and architecture
- Maintain all essential technical information while improving accessibility
- Support the growing ecosystem of AI tools that recognize agents.md

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Consolidate Cursor-specific rules into AGENTS.md and remove tool-specific files

- Add release process section to AGENTS.md with changelog guidelines
- Include Keep a Changelog format requirements and entry formatting rules
- Remove .cursor/rules/release-changelogs.mdc to favor universal AGENTS.md format
- Ensure all AI coding assistants have access to release documentation guidelines

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add blank lines after headings

Co-authored-by: Koichi ITO <koic.ito@gmail.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Koichi ITO <koic.ito@gmail.com>
2025-09-22 23:25:29 -04:00
Koichi ITO
e168292876
Merge pull request #139 from koic/remove_useless_block_argument
Remove unused block parameters
2025-09-21 13:09:20 +09:00
Koichi ITO
0c8937de34 Remove unused block parameters
There are some unused block variables. This change removes block parameters
that consist solely of unused block parameters.
Where `Hash#values` suffices instead of ignoring unused variables,
replace such code with `Hash#values`.
2025-09-20 14:45:08 +09:00
Koichi ITO
a17b23e1a4
Merge pull request #138 from koic/enable_dependabot
Enable Dependabot
2025-09-18 09:37:12 +09:00
Koichi ITO
30d2b0b22b Enable Dependabot
Configure Dependabot to automatically detect updates to the actions used in
GitHub Actions (e.g., `actions/checkout`) and create pull requests for them.

Based on experience, checking for updates on a weekly interval should work well.
2025-09-17 00:26:25 +09:00
Koichi ITO
d67609d43d
Merge pull request #137 from koic/remove_useless_magic_comment
Remove useless magic comment
2025-09-16 02:35:22 +09:00
Koichi ITO
b626425521 Remove useless magic comment
This PR removes useless magic comment.
2025-09-15 12:33:09 +09:00
Ateş Göral
70384c8362
Merge pull request #135 from modelcontextprotocol/ag/v0.3.0 v0.3.0
Release v0.3.0
2025-09-14 10:20:39 -04:00
Ates Goral
deebefd26f Release v0.3.0
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 01:09:18 -04:00
Koichi ITO
bdd69956d5
Merge pull request #133 from codenamev/main
Add Tool output_schema support with comprehensive validation
2025-09-14 09:08:14 +09:00
Ateş Göral
cd4681351d
Merge branch 'main' into main 2025-09-13 17:11:23 -04:00