Build your first AI-usable app.
Use `@geostack/sdk` to define tools, run them locally, publish a Prompt File to GEOstack, install the app in a workspace, and let ChatGPT discover the approved tools.
1. Create an app
npx geostack init my-ai-app cd my-ai-app npm install npm run dev
2. Define a tool
import { geostack } from "@geostack/sdk";
const app = geostack.app("Booking Demo");
app.tool("search_hotels", async ({ city }) => {
return searchHotels(city);
});
export default app;
3. Add production metadata
Before publishing, add descriptions, scopes, input fields, and MCP safety annotations. GEOstack uses this metadata to expose safe tools to AI clients.
app.tool("search_hotels", searchHotels, {
description: "Find available hotels by city.",
scope: "hotels:read",
input: {
city: { type: "string", required: true }
},
annotations: { readOnlyHint: true, destructiveHint: false }
});
4. Inspect the Prompt File
npx geostack inspect app.js --base-url https://your-app.example.com
5. Publish to GEOstack
V1 publishing uses the GEOstack Console. Register an app, copy its app id, then create a secret API key from the API Keys tab. Use the CLI or paste the JSON manually.
GEOSTACK_API_KEY=geo_sk_... \ GEOSTACK_APP_ID=... \ npx geostack publish app.js --base-url https://your-app.example.com
6. Install and connect
- Install the app in a GEOstack workspace.
- Connect ChatGPT to the GEOstack MCP endpoint.
- Ask ChatGPT what tools are available through GEOstack.
What works today: local SDK app definition, local tool execution, Prompt File generation, dashboard Prompt File upload, workspace install, hosted ChatGPT MCP gateway, OAuth connector, and scoped tool discovery.