@openephemeris/mcp-server 3.13.7 → 3.13.9

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.
@@ -0,0 +1,52 @@
1
+ import { registerTool, validateRequired } from "../index.js";
2
+ import { getActiveClient } from "../../backend/client.js";
3
+ registerTool({
4
+ name: "location_search",
5
+ description: "App-only tool for getting location autocomplete suggestions. Returns latitude, longitude, and IANA timezone.",
6
+ inputSchema: {
7
+ type: "object",
8
+ properties: {
9
+ query: {
10
+ type: "string",
11
+ description: "Search query for location, e.g. 'Los Angeles'",
12
+ },
13
+ },
14
+ required: ["query"],
15
+ additionalProperties: false,
16
+ },
17
+ _meta: {
18
+ ui: {
19
+ visibility: ["app"],
20
+ },
21
+ },
22
+ handler: async (args) => {
23
+ validateRequired(args, ["query"]);
24
+ return await getActiveClient().request("GET", "/location/autocomplete", {
25
+ params: { q: args.query },
26
+ });
27
+ },
28
+ });
29
+ registerTool({
30
+ name: "timezone_resolve",
31
+ description: "App-only tool for resolving IANA timezone by latitude and longitude.",
32
+ inputSchema: {
33
+ type: "object",
34
+ properties: {
35
+ latitude: { type: "number" },
36
+ longitude: { type: "number" },
37
+ },
38
+ required: ["latitude", "longitude"],
39
+ additionalProperties: false,
40
+ },
41
+ _meta: {
42
+ ui: {
43
+ visibility: ["app"],
44
+ },
45
+ },
46
+ handler: async (args) => {
47
+ validateRequired(args, ["latitude", "longitude"]);
48
+ return await getActiveClient().request("GET", "/timezone/lookup", {
49
+ params: { lat: args.latitude.toString(), lon: args.longitude.toString() },
50
+ });
51
+ },
52
+ });
@@ -74,6 +74,7 @@ export async function initTools(profile) {
74
74
  await import("./apps/chart-wheel-app.js");
75
75
  await import("./apps/bodygraph-app.js");
76
76
  await import("./apps/bi-wheel-app.js");
77
+ await import("./apps/location-tools.js");
77
78
  }
78
79
  }
79
80
  /**