Skip to content

Commit 207dc82

Browse files
authored
Merge pull request #189 from scottslewis/master
3.16.2
2 parents 31f683d + d204cd8 commit 207dc82

File tree

26 files changed

+104
-190
lines changed

26 files changed

+104
-190
lines changed

doc/bundles/org.eclipse.ecf.doc/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<additionalArgument>-Xdoclint:none</additionalArgument>
3131
<additionalArgument>-splitindex</additionalArgument>
3232
<additionalArgument>-use</additionalArgument>
33-
<additionalArgument>-doctitle "Eclipse Communication Framework (ECF) 3.16.1 API"</additionalArgument>
34-
<additionalArgument>-windowtitle "Eclipse Communication Framework (ECF) 3.16.1 API"</additionalArgument>
33+
<additionalArgument>-doctitle "Eclipse Communication Framework (ECF) 3.16.2 API"</additionalArgument>
34+
<additionalArgument>-windowtitle "Eclipse Communication Framework (ECF) 3.16.2 API"</additionalArgument>
3535
<additionalArgument>-link https://docs.oracle.com/en/java/javase/11/docs/api/</additionalArgument>
3636
<additionalArgument>-link https://docs.osgi.org/javadoc/osgi.core/7.0.0/</additionalArgument>
3737
<additionalArgument>-tag 'noimplement:a:Restriction:'</additionalArgument>

framework/bundles/org.eclipse.ecf.ai.mcp.tools/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %bundle.name
44
Bundle-SymbolicName: org.eclipse.ecf.ai.mcp.tools;singleton:=true
5-
Bundle-Version: 1.1.0.qualifier
5+
Bundle-Version: 2.0.0.qualifier
66
Export-Package: org.eclipse.ecf.ai.mcp.tools.annotation;version="1.1.0",
77
org.eclipse.ecf.ai.mcp.tools.service;version="1.1.0",
88
org.eclipse.ecf.ai.mcp.tools.util;version="1.1.0"

framework/bundles/org.eclipse.ecf.ai.mcp.tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
</parent>
1111

1212
<artifactId>org.eclipse.ecf.ai.mcp.tools</artifactId>
13-
<version>1.1.0-SNAPSHOT</version>
13+
<version>2.0.0-SNAPSHOT</version>
1414
<packaging>eclipse-plugin</packaging>
1515
</project>
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/****************************************************************************
2-
* Copyright (c) 2025 Composent, Inc.
3-
*
4-
* This program and the accompanying materials are made
5-
* available under the terms of the Eclipse Public License 2.0
6-
* which is available at https://www.eclipse.org/legal/epl-2.0/
7-
*
8-
* SPDX-License-Identifier: EPL-2.0
9-
*****************************************************************************/
101
package org.eclipse.ecf.ai.mcp.tools.annotation;
112

123
import java.lang.annotation.ElementType;
@@ -22,6 +13,6 @@
2213

2314
String description() default "";
2415

25-
ToolAnnotation[] annotations() default {};
16+
ToolAnnotations annotations();
2617

2718
}

framework/bundles/org.eclipse.ecf.ai.mcp.tools/src/org/eclipse/ecf/ai/mcp/tools/annotation/ToolAnnotation.java

Lines changed: 0 additions & 28 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
/****************************************************************************
2-
* Copyright (c) 2025 Composent, Inc.
3-
*
4-
* This program and the accompanying materials are made
5-
* available under the terms of the Eclipse Public License 2.0
6-
* which is available at https://www.eclipse.org/legal/epl-2.0/
7-
*
8-
* SPDX-License-Identifier: EPL-2.0
9-
*****************************************************************************/
101
package org.eclipse.ecf.ai.mcp.tools.annotation;
112

123
import java.lang.annotation.ElementType;
134
import java.lang.annotation.Retention;
145
import java.lang.annotation.RetentionPolicy;
156
import java.lang.annotation.Target;
167

8+
/**
9+
* Supports the addition of ToolAnnotations to Tool spec in the MCP schema
10+
* (draft as of 5/18/2025) located <a href=
11+
* "https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/draft/schema.json#L2164">here</a>
12+
*/
1713
@Retention(RetentionPolicy.RUNTIME)
1814
@Target(ElementType.METHOD)
1915
public @interface ToolAnnotations {
20-
ToolAnnotation[] value() default {};
16+
17+
String title() default "";
18+
19+
boolean destructiveHint() default false;
20+
21+
boolean idempotentHint() default false;
22+
23+
boolean openWorldHint() default false;
24+
25+
boolean readOnlyHint() default false;
26+
2127
}

framework/bundles/org.eclipse.ecf.ai.mcp.tools/src/org/eclipse/ecf/ai/mcp/tools/annotation/ToolParam.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/****************************************************************************
2-
* Copyright (c) 2025 Composent, Inc.
3-
*
4-
* This program and the accompanying materials are made
5-
* available under the terms of the Eclipse Public License 2.0
6-
* which is available at https://www.eclipse.org/legal/epl-2.0/
7-
*
8-
* SPDX-License-Identifier: EPL-2.0
9-
*****************************************************************************/
101
package org.eclipse.ecf.ai.mcp.tools.annotation;
112

123
import java.lang.annotation.ElementType;

framework/bundles/org.eclipse.ecf.ai.mcp.tools/src/org/eclipse/ecf/ai/mcp/tools/annotation/ToolResult.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/****************************************************************************
2-
* Copyright (c) 2025 Composent, Inc.
3-
*
4-
* This program and the accompanying materials are made
5-
* available under the terms of the Eclipse Public License 2.0
6-
* which is available at https://www.eclipse.org/legal/epl-2.0/
7-
*
8-
* SPDX-License-Identifier: EPL-2.0
9-
*****************************************************************************/
101
package org.eclipse.ecf.ai.mcp.tools.annotation;
112

123
import java.lang.annotation.ElementType;

framework/bundles/org.eclipse.ecf.ai.mcp.tools/src/org/eclipse/ecf/ai/mcp/tools/util/ToolAnnotationDescription.java

Lines changed: 0 additions & 37 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.eclipse.ecf.ai.mcp.tools.util;
2+
3+
import org.eclipse.ecf.ai.mcp.tools.annotation.ToolAnnotations;
4+
5+
/**
6+
* Describes the ToolAnnotations type in the MCP schema (draft as of 5/18/2025)
7+
* located <a href=
8+
* "https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/draft/schema.json#L2164">here</a>
9+
*/
10+
public record ToolAnnotationsDescription(boolean destructiveHint, boolean idempotentHint, boolean openWorldHint,
11+
boolean readOnlyHint, String title) {
12+
13+
public static ToolAnnotationsDescription fromAnnotations(ToolAnnotations annotations) {
14+
if (annotations != null) {
15+
return new ToolAnnotationsDescription(annotations.destructiveHint(), annotations.idempotentHint(),
16+
annotations.openWorldHint(), annotations.readOnlyHint(), annotations.title());
17+
} else {
18+
return null;
19+
}
20+
}
21+
}

framework/bundles/org.eclipse.ecf.ai.mcp.tools/src/org/eclipse/ecf/ai/mcp/tools/util/ToolDescription.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/****************************************************************************
2-
* Copyright (c) 2025 Composent, Inc.
3-
*
4-
* This program and the accompanying materials are made
5-
* available under the terms of the Eclipse Public License 2.0
6-
* which is available at https://www.eclipse.org/legal/epl-2.0/
7-
*
8-
* SPDX-License-Identifier: EPL-2.0
9-
*****************************************************************************/
101
package org.eclipse.ecf.ai.mcp.tools.util;
112

123
import java.lang.reflect.Modifier;
@@ -21,7 +12,7 @@
2112
import org.eclipse.ecf.ai.mcp.tools.annotation.ToolAnnotations;
2213

2314
public record ToolDescription(String name, String description, List<ToolParamDescription> toolParamDescriptions,
24-
ToolResultDescription resultDescriptions, List<ToolAnnotationDescription> toolAnnotationDescriptions) {
15+
ToolResultDescription resultDescription, ToolAnnotationsDescription toolAnnotationsDescription) {
2516

2617
public static List<ToolDescription> fromClass(Class<?> clazz) {
2718
return Arrays.asList(clazz.getMethods()).stream().map(m -> {
@@ -34,7 +25,7 @@ public static List<ToolDescription> fromClass(Class<?> clazz) {
3425
ToolAnnotations tas = m.getAnnotation(ToolAnnotations.class);
3526
return new ToolDescription(m.getName(), ma.description(),
3627
ToolParamDescription.fromParameters(m.getParameters()), ToolResultDescription.fromMethod(m),
37-
ToolAnnotationDescription.fromAnnotations(tas != null ? tas.value() : null));
28+
ToolAnnotationsDescription.fromAnnotations(tas));
3829
}
3930
}
4031
return null;

framework/bundles/org.eclipse.ecf.ai.mcp.tools/src/org/eclipse/ecf/ai/mcp/tools/util/ToolParamDescription.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/****************************************************************************
2-
* Copyright (c) 2025 Composent, Inc.
3-
*
4-
* This program and the accompanying materials are made
5-
* available under the terms of the Eclipse Public License 2.0
6-
* which is available at https://www.eclipse.org/legal/epl-2.0/
7-
*
8-
* SPDX-License-Identifier: EPL-2.0
9-
*****************************************************************************/
101
package org.eclipse.ecf.ai.mcp.tools.util;
112

123
import java.lang.reflect.Parameter;
@@ -18,7 +9,7 @@
189

1910
import org.eclipse.ecf.ai.mcp.tools.annotation.ToolParam;
2011

21-
public record ToolParamDescription(String name, String description, boolean required) {
12+
public record ToolParamDescription(String name, String description, boolean required, Parameter parameter) {
2213

2314
public static List<ToolParamDescription> fromParameters(Parameter[] parameters) {
2415
return parameters != null ? Arrays.asList(parameters).stream().map(p -> {
@@ -28,7 +19,7 @@ public static List<ToolParamDescription> fromParameters(Parameter[] parameters)
2819
if ("".equals(name)) {
2920
name = p.getName();
3021
}
31-
return new ToolParamDescription(name, tp.description(), tp.required());
22+
return new ToolParamDescription(name, tp.description(), tp.required(), p);
3223
}
3324
return null;
3425
}).filter(Objects::nonNull).collect(Collectors.toList()) : Collections.emptyList();

framework/bundles/org.eclipse.ecf.ai.mcp.tools/src/org/eclipse/ecf/ai/mcp/tools/util/ToolResultDescription.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/****************************************************************************
2-
* Copyright (c) 2025 Composent, Inc.
3-
*
4-
* This program and the accompanying materials are made
5-
* available under the terms of the Eclipse Public License 2.0
6-
* which is available at https://www.eclipse.org/legal/epl-2.0/
7-
*
8-
* SPDX-License-Identifier: EPL-2.0
9-
*****************************************************************************/
101
package org.eclipse.ecf.ai.mcp.tools.util;
112

123
import java.lang.reflect.Method;

releng/features/org.eclipse.ecf.ai.mcp.tools.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.ecf.ai.mcp.tools.feature"
44
label="ECF AI Model Context Protocol Tool Support Feature"
5-
version="1.1.0.qualifier"
5+
version="2.0.0.qualifier"
66
provider-name="Eclipse.org - ECF"
77
license-feature="org.eclipse.license"
88
license-feature-version="0.0.0">

releng/features/org.eclipse.ecf.ai.mcp.tools.feature/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
</parent>
1111

1212
<artifactId>org.eclipse.ecf.ai.mcp.tools.feature</artifactId>
13-
<version>1.1.0-SNAPSHOT</version>
13+
<version>2.0.0-SNAPSHOT</version>
1414
<packaging>eclipse-feature</packaging>
1515
</project>

releng/features/org.eclipse.ecf.core/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.ecf.core"
44
label="ECF SDK for Eclipse"
5-
version="3.16.1.qualifier"
5+
version="3.16.2.qualifier"
66
provider-name="%providerName"
77
plugin="org.eclipse.ecf"
88
license-feature="org.eclipse.license"

releng/features/org.eclipse.ecf.core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
</parent>
1111
<groupId>org.eclipse.ecf</groupId>
1212
<artifactId>org.eclipse.ecf.core</artifactId>
13-
<version>3.16.1-SNAPSHOT</version>
13+
<version>3.16.2-SNAPSHOT</version>
1414
<packaging>eclipse-feature</packaging>
1515
</project>

releng/features/org.eclipse.ecf.remoteservice.sdk.bndtools.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.ecf.remoteservice.sdk.bndtools.feature"
44
label="ECF Remote Services SDK for Bndtools"
5-
version="3.16.1.qualifier"
5+
version="3.16.2.qualifier"
66
provider-name="%providerName"
77
license-feature="org.eclipse.license"
88
license-feature-version="0.0.0">

releng/features/org.eclipse.ecf.remoteservice.sdk.bndtools.feature/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<relativePath>../../../</relativePath>
1010
</parent>
1111
<artifactId>org.eclipse.ecf.remoteservice.sdk.bndtools.feature</artifactId>
12-
<version>3.16.1-SNAPSHOT</version>
12+
<version>3.16.2-SNAPSHOT</version>
1313
<packaging>eclipse-feature</packaging>
1414
</project>

releng/features/org.eclipse.ecf.remoteservice.sdk.eclipse.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.ecf.remoteservice.sdk.eclipse.feature"
44
label="ECF Remote Services SDK for Eclipse"
5-
version="3.16.1.qualifier"
5+
version="3.16.2.qualifier"
66
provider-name="%providerName"
77
license-feature="org.eclipse.license"
88
license-feature-version="0.0.0">

releng/features/org.eclipse.ecf.remoteservice.sdk.eclipse.feature/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<relativePath>../../../</relativePath>
1010
</parent>
1111
<artifactId>org.eclipse.ecf.remoteservice.sdk.eclipse.feature</artifactId>
12-
<version>3.16.1-SNAPSHOT</version>
12+
<version>3.16.2-SNAPSHOT</version>
1313
<packaging>eclipse-feature</packaging>
1414
</project>

releng/features/org.eclipse.ecf.remoteservice.sdk.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.ecf.remoteservice.sdk.feature"
44
label="ECF Remote Services SDK for OSGi clients and servers"
5-
version="3.16.1.qualifier"
5+
version="3.16.2.qualifier"
66
provider-name="%providerName"
77
license-feature="org.eclipse.license"
88
license-feature-version="0.0.0">

releng/features/org.eclipse.ecf.remoteservice.sdk.feature/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
</parent>
1111
<groupId>org.eclipse.ecf</groupId>
1212
<artifactId>org.eclipse.ecf.remoteservice.sdk.feature</artifactId>
13-
<version>3.16.1-SNAPSHOT</version>
13+
<version>3.16.2-SNAPSHOT</version>
1414
<packaging>eclipse-feature</packaging>
1515
</project>

releng/features/org.eclipse.ecf.sdk/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.ecf.sdk"
44
label="%featureName"
5-
version="3.16.1.qualifier"
5+
version="3.16.2.qualifier"
66
provider-name="%providerName"
77
license-feature="org.eclipse.license"
88
license-feature-version="0.0.0">

0 commit comments

Comments
 (0)