Skip to main content
Glama
RestDB

Codehooks.io MCP Server

by RestDB

deploy_code

Deploys JavaScript files to a Codehooks.io project, creating serverless APIs with built-in CORS and optional instant CRUD backends.

Instructions

Deploy JavaScript code to Codehooks.io project.

MINIMAL WORKING EXAMPLE:

import { app } from 'codehooks-js';

app.get('/hello', (req, res) => {
  res.json({ message: 'Hello, world!' });
});

// MANDATORY: bind to serverless runtime
export default app.init();

INSTANT CRUD BACKEND:

import { app } from 'codehooks-js';

// Creates complete CRUD API for any collection (no schema required)
app.crudlify();

export default app.init();

KEY REQUIREMENTS:

  • Always import from 'codehooks-js'

  • Always end with export default app.init();

  • Use app.get(), app.post(), app.put(), app.delete() for routes

  • For database: const conn = await Datastore.open(); conn.insertOne(collection, data);

  • Use app.crudlify() to create complete CRUD backend with no schema required

  • Package.json will be auto-generated if not provided

DOCUMENTATION:

Note: Codehooks.io has CORS built-in by default, so no additional CORS middleware is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesArray of files to deploy
mainNoApplication main file (defaults to 'index')
jsonNoOutput JSON format
projectIdNoProject ID
spaceIdNoSpace IDdev
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility. It mentions auto-generation of package.json and built-in CORS, but does not disclose potential side effects like overwriting existing code or permission requirements. This is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively long but well-structured with clear sections, code examples, and links. The first sentence states the purpose. Every part adds value, though some details could be condensed. Justified 4.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Considering the tool's complexity (deploying code files) and the absence of output schema or annotations, the description provides comprehensive context: examples, requirements, and documentation links. It covers what the agent needs to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter described. The description adds value through examples and requirements (e.g., 'index.js' path, 'dev' space default), but does not significantly extend beyond the schema's own descriptions. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Deploy JavaScript code to Codehooks.io project.' This is a specific verb-resource pair, and the examples further clarify. No sibling tool duplicates this purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides key requirements, minimal working examples, and instructions. It implicitly guides when to use this tool (to deploy code). However, it does not explicitly state when not to use it or list alternatives, though no close siblings exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RestDB/codehooks-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server